grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] support of hfsx ( case comparaison )


From: Pavel Roskin
Subject: Re: [PATCH] support of hfsx ( case comparaison )
Date: Sun, 07 Jun 2009 13:40:44 -0400

On Sun, 2009-06-07 at 11:10 +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Sun, Jun 7, 2009 at 4:18 AM, Pavel Roskin<address@hidden> wrote:
> >>  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.
> Normally not but fat code passes short filenames to grub without any
> encoding conversion. In other words fat code assumes short filenames
> are in utf8. A problem in both hfs and fat is that it uses local
> encoding and at least in case of fat it's impossible to know which one
> from filesystem alone. We would need something like mount option to
> get this right. It could be sth like
> hd0_0_codepage=437

Fortunately, it would only matter if the user tries to access a file
with non-ASCII characters using a capitalization different from the one
used by the filesystem.

> > 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.
> I agree with you. I see no reason for users to have unicode characters
> in kernel names. And so getting it right is too much work for an
> almost zero benefit

I case of hfsplus, there is a chance to miss a file in the binary tree
if there are non-ASCII files in the same directory.  But I agree, it's
not worth the trouble at this point.

-- 
Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]