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: Thu, 12 Mar 2009 18:38:21 -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 Rogier Wolff on 3/10/2009 9:15 AM:
> On Tue, Mar 10, 2009 at 02:40:32PM +0000, Eric Blake wrote:
>> Most likely, this is due to your choice of locales, and not a bug
>> in sort nor in ls.
>>
>> http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021
>> http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-ls-command-is-not-listing-files-in-a-normal-order_0021
> 
> Apparently it's LANG that sets the locale: no LC_* variables were set. 

LANG is the default that is used when LC_* are not set, which in turn are
used only when LC_ALL is not set.  And if LANG is not set, then it is
system-defined what the default is (in other words, with LANG not set, you
may get lucky and get the C locale on your system, but not on all
systems).  The FAQ recommends LC_ALL because that is the simplest fix, not
to mention that it avoids problems that may arise from mixing incompatible
LC categories (such as selecting a unibyte LC_CTYPE but a multibyte
LC_COLLATE).

- --
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

iEYEARECAAYFAkm5qv0ACgkQ84KuGfSFAYBn2gCfc6suyOlI1fDwWmfYKj/NOKf6
yJAAoIw0Xw8HHUcBSRQlLJ7V9pI9+5hf
=nhLF
-----END PGP SIGNATURE-----




reply via email to

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