From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] support of hfsx ( case comparaison )
Date: Sat, 06 Jun 2009 22:18:40 -0400 [thread overview]
Message-ID: <1244341120.18630.29.camel@mj> (raw)
In-Reply-To: <d7ead6de0906051246g59f61088ne9509073d9f30e95@mail.gmail.com>
On Fri, 2009-06-05 at 21:46 +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Fri, Jun 5, 2009 at 9:23 PM, Michael Scherer<misc@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
next prev parent reply other threads:[~2009-06-07 2:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 21:52 [PATCH] support of hfsx ( case comparaison ) Michael Scherer
2009-02-07 21:02 ` Robert Millan
2009-05-03 17:19 ` Michael Scherer
2009-06-01 10:11 ` Vladimir 'phcoder' Serbinenko
2009-06-03 7:56 ` Michael Scherer
2009-06-03 9:26 ` Vladimir 'phcoder' Serbinenko
2009-06-03 10:54 ` Michael Scherer
2009-06-03 21:23 ` Pavel Roskin
2009-06-05 19:23 ` Michael Scherer
2009-06-05 19:46 ` Vladimir 'phcoder' Serbinenko
2009-06-07 2:18 ` Pavel Roskin [this message]
2009-06-07 9:10 ` Vladimir 'phcoder' Serbinenko
2009-06-07 17:40 ` Pavel Roskin
2009-06-05 21:08 ` Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244341120.18630.29.camel@mj \
--to=proski@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.