View Single Post
Old 08-13-2008, 03:54 AM  
Too much time...
Join Date: May 2005
Posts: 1,194
Default Need your help to test

The short answer is.... no, but it does partially work.

I've said in the past that enabling real Unicode support in ioFTPD would be REALLY hard to do. I'd almost be better off writing a new server kind of hard. On the other hand, FTP clients use UTF-8 encoded filenames which ioFTPD doesn't understand and thus leaves untouched so things just work as far as the FTP client is concerned.

Here's some tests that you could perform for me... Start up your favorite FTP client and look at a local directory with Chinese characters in it and make sure it shows the names correctly. Now, start up a plain ioFTPD (no scripts at all) and transfer some files, then look at the directory. Do the files look the same when viewed in the FTP directory listing? They probably should sort the same way in the FTP client as well, but can't be positive of that under all cases.

I suspect from what I can tell that the above test will actually work. Here's where it gets interesting though. If you view the directory in windows where the FTP uploaded the files you will NOT see recognizable directory names. The names will look really odd because they are actually the UTF-8 encoded names. When those names are fed back to the FTP client and it decodes them you get back the original correct Chinese name.

So, from a plain ioFTPD perspective the FTP will support the UTF-8 naming conventions, but it isn't Unicode aware so the local directory names are not converted to Unicode so you can see them properly. This also means that any real Unicode directory name you copy over to an exported directory in the VFS is essentially inaccessible from the server because it's not smart enough to handle it, but if you upload it locally instead of copying it will be visible.

Assuming I'm correct in how things are working so far, we now run into TCL script problems. TCL actually uses UTF-8 internally, and thus is Unicode aware but that's actually a liability at the moment since ioFTPD doesn't. If it were to assume UTF-8 names were being sent to it, but treat them as plain characters I think it should work. I don't really have a way to test stuff though, and my early tries showed some problems so I don't know what's going on...

Here's another test you can do for me though. Create a .sfv file for a bunch of Chinese named files and then upload the .sfv and the files to an ioFTPD without any scripts installed. Now look at the directory where the files were uploaded, does the .sfv file internally encode the names the same as you see in the directory? I think .sfv files should use UTF-8 to encode the names but I can't be sure. If it does, then in theory scripts should be able to manage...

So please run those tests and let me know what you find out.
Yil is offline   Reply With Quote