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: Linda Walsh
Subject: Re: locale specific ordering in EN_US -- why is a<A<b<B<y<Y<z<Z?
Date: Mon, 21 May 2012 12:51:40 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666



Chet Ramey wrote:

On 5/21/12 3:37 PM, Linda Walsh wrote:

----
    This is a prime example of Posix being stupid and bad for
computer science.

    They take a deterministic behavior and define it to be
non-deterministic and break 1000's of programs.

Try being a little less English-centric.  Collating order varies by
language.

Posix says that ranges work the way you are used to if you force the
traditional ordering using the `C' or `Posix' locale.  Take a deep
breath and use LC_ALL=C in your scripts to avoid depending on whatever
your OS uses as the default.



FWIW, I put LC_COLLATE='C' in my System startup scripts...

So I'm NOT being bitten by this problem directly... I'm trying to
figure out how the heck this got voted on in POSIX, to be a correct
standard such that it would break current programs...

POSIX is not supposed to be prescriptive -- but **descriptive**...

I can't think of anywhere that a-z or A-Z would have included letters
from the opposite case... so how did POSIX come to *prescribe* that this
be the case... since I can't see that as being descriptive.





reply via email to

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