If you give a Mac OS X folder a name containing diacritics, like "doré" (means golden in french), the local FTP server does not serve it as:


but as:


when the LIST of files is queried. In other words, it's d-o-r-e-acute and not d-o-r-é. See below the raw binary data.

300: ftp://glazou@localhost/website/
200: filename content-length last-modified file-type
201: \".DS_Store\" 6148 Sun%2C%2014%20Jan%202009%2017%3A09%3A00 FILE
201: \"dore\xCC\x81\" 0 Sun%2C%2014%20Jan%202009%2017%3A09%3A00 DIRECTORY

What's weird here is that the local storage of the file name seems to be the correct dor\xC3A9. I have verified this through at least 3 different techniques and always end up with the same result. The simplest way to verify it is to use Filezilla:

  1. launch filezilla
  2. open preferences > Debug and check Show raw data for directory contents (not sure of the translation, I'm using fr-FR version)
  3. connect to the ftp server
  4. browse the directory containing the "doré" directory
  5. see the raw data in the logger at the top of the Filezilla window
  6. locate the line for "doré" directory, copy that name
  7. open Firefox's JS console
  8. type a quote, paste your string, type another quote and end with ".toSource()", hit return
  9. see result : (new String("dore\u0301"))

That's very painful since a user may experience failures in ftp commands, and I think it's a rather big internationalization bug on Apple's ftp server... Does someone have a clue ?