Re: [Afpfs-ng-devel] precompose and decompose
Status: Alpha
Brought to you by:
alexthepuffin
From: HAT <ha...@fa...> - 2008-04-03 16:24:08
|
Mac OS X don't use bare precomopsition and bare decomosition. NFC and NFD are implemented. These are complete normalization. The processes of NFC and NFD are as follows. NFC decompose(including singleton) -> ordering -> precompose NFD decompose(including singleton) -> ordering NFC and NFD are irreversible conversions. If the table of decomposition have a term "X -> Y", NFC X -> Y Y -> Y NFD X -> Y Y -> Y "X" doesn't exist in HFS+. It is saved as "Y". Maybe, the problem will not occur even if afpfs-ng imprement or not because Mac OS X 10.2 and later implement NFC and NFD perfectly. Netatalk don't implement Singleton. I think that it's ideal. Netatalk use not HFS+ but general UNIX filesystem. "X" and "Y" might exist in one directory. It is not ideal that netatalk report to the clients, "I have Y and Y". It's better reporting "I have X and Y". This is not a perfect method. But I think it's better. If afpfs-ng implement singleton and netatalk have X only... Netatalk says "I have X" Afpfs-ng convert from X to Y. Afpfs-ng says "Please give me Y" Netatalk says "I have no Y" Therefore, I think that afpfs-ng should not implement Singleton. AFP server might have to act like a HFS+ as much as possible. But afpfs-ng should act like a UNIX filesystem. Afpfs-ng need not perfectly implement NFC and NFD. ----------------------------------------------------------------------- Mac OS X 10.0/10.1's NFC and NFD are imprefect because it's besed on Unicode 2.x. The decompose() and ordering() are necessary for Mac OS X 10.0/10.1's imperfect filenames. decompose(excluding singleton) -> ordering -> precompose However, A complete Mac OS X 10.0/10.1 support will be impossible maybe. It is unstable that Mac OS X 10.2/10.3/10.4 connect to 10.0/10.1. ----------------------------------------------------------------------- At first, afpfs-ng should implement bare UCS4precompose() that having perfect table[] for Mac OS X 10.2 and later. The Mac OS X 10.0/10.1 support is the next step. -- HAT |