bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort order changed in "sort" and "ls".


From: Eric Blake
Subject: Re: sort order changed in "sort" and "ls".
Date: Fri, 13 Mar 2009 13:42:38 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bob Proulx on 3/13/2009 12:22 PM:
> 
> With no LANG nor LC_* variables set the default locale is the
> traditional C locale.  This is also standardized by POSIX and is also
> known as the POSIX locale.  The strings "C" and "POSIX" are equivalent
> but most typically us traditionalists use "C" as an emphasis that it
> is the traditional behavior that we are setting.  Setting LANG=C is
> the same as not setting it at all.

Not necessarily true.  POSIX allows systems to choose an
implementation-defined default if LANG is unset, and Bruno has made
reports of some systems being localized in spite of not having any locale
variables set.  Off-hand, I'm not sure which systems default to C when all
variables are unset, vs. systems where unset can still imply localization.
 But the net result is that if you want to guarantee anything, you MUST
set at least one of the three levels of locale variables.

> Then you *must* have had LANG or LC_COLLATE set.  You can print your
> locale settings with the 'locale' command.
> 
>   $ locale

The locale command is required to report your default locale, even if all
three levels of variables are unset but the system defaults to a non-C locale.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkm6ty4ACgkQ84KuGfSFAYCFJwCYvLbI4/wA1WThnbRr6R/K3sKG
AwCgv54KsAK02c1Vku3F1ZHermpcpto=
=L5jT
-----END PGP SIGNATURE-----




reply via email to

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