On Thu, Jul 15, 2010 at 5:36 AM, Chet Ramey <chet.ra...@case.edu> wrote:
> On 7/15/10 8:19 AM, Andreas Schwab wrote:
>> Chet Ramey <chet.ra...@case.edu> writes:
>>
>>> If en_US happens to be the system's default locale, of course.  You
>>> can only be sure that you'll get ASCII sorting order if you set
>>> LANG=C.
>>
>> No, you need to set LC_ALL=C, because LANG has the lowest priority.
>
> That's true enough, but Bruce said he already removed all the LC_
> variables from his environment, so LANG should work.

"It's too hard."  :)

> $ locale
> LANG=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=

So, for future reference, put this in my bashrc?

eval $(locale | sed 's/=.*/=C/;s/^/export /')

and remove the unset stuff?  Of course, this is a GNU C Lib thingey,
so it only works on GNU C Lib based systems.....


By the way, Chet, once upon a time long ago and far away, I
patched BASH to support BASH_TRACEFD because where I
worked there were 10's of thousands of lines of BASH scripting
that presumed that output to stderr meant command failure.
Well, I've moved on and lo and behold there's more scripting
that makes that assumption.  This time, merely thousands of lines.
I'll re-do my old patch if you're ready to deal with it.  :)

Thanks!  Regards, Bruce

Reply via email to