[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sort bizard behavior [was: (no subject)]
From: |
Eric Blake |
Subject: |
sort bizard behavior [was: (no subject)] |
Date: |
Mon, 02 Apr 2007 19:46:49 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to ara on 4/2/2007 2:59 PM:
> Subject: sort bizard behavior
Your mailer did not format the subject line properly.
>
> Please read the following. I do not know if it should be like that
>
>
> address@hidden:~> export LANG=en_US.UTF-8
> address@hidden:~> sort < s2
> 10 sfdafdsafdsa
> 1 safdfdsafsd
> 22
> address@hidden:~> unset LANG
> address@hidden:~> sort < s2
> 1 safdfdsafsd
> 10 sfdafdsafdsa
> 22
Yes, that is correct. LANG controls the default setting of LC_COLLATE
(which can also be controlled by LC_ALL); setting any one of these three
environment variables to anything other than C (or POSIX) means that you
want strcoll to obey locale sorting rules. And the en_US.UTF-8 locale
intentionally does not sort by byte order in strcoll.
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGEbIJ84KuGfSFAYARAlihAKCGjmz24wpF6pphkJD0X2TS0jhM2QCfVxFy
8SWbf7xuY6Gn439/KuswN3I=
=sldv
-----END PGP SIGNATURE-----
- (no subject), ara, 2007/04/02
- sort bizard behavior [was: (no subject)],
Eric Blake <=