On Fri, 2009-06-05 at 21:46 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Fri, Jun 5, 2009 at 9:23 PM, Michael Scherer<m...@mandriva.org> wrote: > > > >> > >> We may need to use a comparison table as in hfs.c, as least for the > >> first 256 Unicode characters, but it's a separate issue. > > > > That a little bit too complex for me, I have just patched grub for the > > simplest case, and for the issue I faced on my own computer. > It's actually a problem with grub_strcasecmp since it doesn't take > utf8 into account. HFS+ unlike HFS uses Unicode (UTF-16 normalisation > form d to be exact) so no need for special handling here.
Good to know. I was wrong to assume that hfsplus uses the same weird case ordering as hfs extended to Unicode. On the other hand, hfsplus uses composition and decomposition, at least optionally. So implementing it correctly may require quite a lot of code. > Improving > strcasecmp is possible and may even be compact. Even if unicode counts > a lot of alphabets only few are bicameral. AFAIK main ones are Latin, > Greek, Cyrillic and Armenian. I hope that in most cases the lowercase > conversion can be done with some simple arithmetic operations We are using grub_strcasecmp() on data in other encodings in some cases. I think short names on the FAT filesystem are never in UTF-8. Also, case comparison depends on the locale. That's too much complexity for the code GRUB. I would prefer the case comparison for hfsplus to be in the hfsplus module if we decide to implement it correctly. -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel