From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MD7yE-0006Du-WE for mharc-grub-devel@gnu.org; Sat, 06 Jun 2009 22:18:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MD7yC-0006Dl-Q4 for grub-devel@gnu.org; Sat, 06 Jun 2009 22:18:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MD7y7-00069n-2r for grub-devel@gnu.org; Sat, 06 Jun 2009 22:18:47 -0400 Received: from [199.232.76.173] (port=50778 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MD7y6-00069c-Vh for grub-devel@gnu.org; Sat, 06 Jun 2009 22:18:43 -0400 Received: from c60.cesmail.net ([216.154.195.49]:14979) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MD7y6-0001S9-Is for grub-devel@gnu.org; Sat, 06 Jun 2009 22:18:42 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 06 Jun 2009 22:18:38 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 2C33534C6A for ; Sat, 6 Jun 2009 22:22:31 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <98CCCF83-70FB-4EC3-A27C-D184D14AB95D@mandriva.org> <20090207210244.GL988@thorin> <7A5F880B-2772-4E4F-AD16-BC861AACC216@mandriva.org> <1244015775.2297.46.camel@akroma.ephaone.org> <1244026488.5031.2.camel@akroma.ephaone.org> <1244064185.20653.37.camel@mj> <1244229804.4857.154.camel@akroma.ephaone.org> Content-Type: text/plain Date: Sat, 06 Jun 2009 22:18:40 -0400 Message-Id: <1244341120.18630.29.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] support of hfsx ( case comparaison ) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 02:18:49 -0000 On Fri, 2009-06-05 at 21:46 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Fri, Jun 5, 2009 at 9:23 PM, Michael Scherer 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