bug-bash
[Top][All Lists]
Advanced

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

Re: locale specific ordering in EN_US -- why is a<A<b<B<y<Y<z<Z?


From: Chet Ramey
Subject: Re: locale specific ordering in EN_US -- why is a<A<b<B<y<Y<z<Z?
Date: Fri, 28 Jun 2013 23:06:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

On 6/28/13 5:08 AM, Paolo Bonzini wrote:

>>> On non-glibc systems they use gnulib's regex implementation, so they're
>>> fine.
>>
>> You presume much.  Bash, for instance, doesn't use a regex implementation,
>> especially not gnulib's.
> 
> Does that mean you have no way to make sure that [A-Z] is sane on
> non-glibc implementation?  I see sh_regmatch uses regcomp/regexec on
> bash 4.2.

Let's take a minute to establish what we're talking about here.  Something
like 'ls [a-z]' uses bash's own matching code.  It's closer to fnmatch than
a regex implementation.  In fact, the bash strmatch and the glibc fnmatch
code share a common ancestor.

The regex calls you see are for the [[ command's =~ operator.


> What about the remaining 99% that doesn't use your own matching code?
> Including the bash 4.2 source I'm looking at?

See above.

Nobody is arguing that changing glibc is not part of the solution.  Once
everyone agrees on an acceptable interpretation, we can make all the code
do the right thing.  Making glibc implement the agreed-upon interpretation
is one of the steps.  There are just more things that have to be done.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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