[hfs-user] Case-insensitive sort...
Mon, 22 Jul 2002 09:55:50 +0200 (MEST)
Both the HFS specs and the HFS+ technical notes say that the keys
of the records in the Catalog B-Tree have to be sorted in a case insensitive
fashion. The names are however in MacRoman and Unicode encoding respectively.
I stumbled across a case where I had underscores '_' in my filenames and the
Finder gave up on certain files on my HFS+ volume though the same sort
techniques worked fine for HFS.
It took me some time and quite a bit of trial and error to figure out that a
toupper(..) works fine for HFS but not for HFS+..... using a tolower(..)
instead solved the problem for Unicode... what's the reason ?... Is
'case-insensitive' sorting for MacRoman in some way different from case-insensitive
sorting for Unicode ??? Ultimately the same codes are used except for the fact
that we have a 2-Byte character representation, right ?
Any tips are greatly appreciated !
GMX - Die Kommunikationsplattform im Internet.