Re: [Afpfs-ng-devel] accented characters in UTF-8 filenames
Status: Alpha
Brought to you by:
alexthepuffin
From: Alex d. <ale...@gm...> - 2007-05-15 19:53:06
|
Michael, You're absolutely right. There need to be conversions between precomposed and decomposed UTF8 filenames. Just because my native language is English doesn't mean that we shouldn't have full internationalization support in afpfs-ng! I'm never proud of my code, and a particularly hacky bit is in copy_path() in utils.c. There, you can see that I'm hardcoding the unicode hint, etc. I'm sure this isn't correct, it just happens to work for non-extended characters. This code is only ever hit for pathnames, not volume names. The thing that would help all of this is having a snippet of C code that handle translation between pre and decomposed UTF8. That's the part I haven't figured out yet. I'll read the link below when I'm not at work. You may have noticed a bit of a lag in afpfs-ng releases; I've been putting most of my energy into redesigning some of the internals for multiple clients. This would allow a command line version (similiar to an FTP client), a gnome-vfs2 interface, etc to all talk to the same protocol handler. The FUSE interface stays, also. - Alex On 5/15/07, Michael Ulbrich <mu...@re...> wrote: > Hi Alex, > Hi list, > > from what I've learned today MAC OSX volumes (HFS+) use decomposed UTF-8 > characters in file and directory names (base character and accent are > not encoded as a single multibyte character [precomposed Unicode], but > instead the base character stands for itself and is followed by a > multibyte "accent only" character [decomposed Unicode]). > > http://developer.apple.com/qa/qa2001/qa1173.html gives some comments on > this topic. > > When mounting a OSX volume from a linux box via afp-client, I get a > correct listing of volume names in a terminal set to UTF-8 charset, even > if accented characters are contained in the names. > > Saving this listing output to a text file and trying to convert this > file from UTF-8 to a different charset (e.g. ISO-8859-2) with recode or > iconv leads to 'invalid input' error messages. > > Maybe I'm completely wrong here and somehow don't see the obvious ... > OTOH I feel that there should be some decomposed -> precomposed > conversion in afpfs-ng (or somewhere else on the OSX side ...?) to > deliver filenames in 'standard' (precomposed) UTF-8, which are correctly > coded for further processing on the linux side. > > Please let me know, if I shall provide further information or give any > other assistance. > > Best regards ... Michael > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Afpfs-ng-devel mailing list > Afp...@li... > https://lists.sourceforge.net/lists/listinfo/afpfs-ng-devel > |