[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls (GNU coreutils) 6.9 - Ordering wrong in en_AU locale - .dot files
From: |
Eric Blake |
Subject: |
Re: ls (GNU coreutils) 6.9 - Ordering wrong in en_AU locale - .dot files interspersed |
Date: |
Fri, 22 Jun 2007 07:56:18 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please keep replies on the list, so that others may learn from this exchange.
According to Lyall Pearce on 6/22/2007 7:44 AM:
> Eric Blake wrote:
>> According to Lyall Pearce on 6/22/2007 7:22 AM:
>>> Using
>>> coreutils 6.9 (gentoo version is sys-apps/coreutils-6.9-r1)
>>> glibc 2.5 (gentoo version sys-apps/glibc-2.5-r3)
>>> env variable LANG=en_AU
>>> ls -la output intersperses .dot files amongst normal files, (see example
>>> below)
>> Not a bug, but a feature of your locale.
>> http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-ls-command-is-not-listing-files-in-a-normal-order_0021
>>
> Thank you Eric, for replying so promptly.
>
> Where should I take this now, as I don't consider this to be a positive
> 'feature' of my locale.
Here's how to choose en_AU for everything except for sort order, which
will use standard C (ie. traditional byte-based) sorting.
LANG=en_AU
LC_COLLATE=C
export LANG LC_COLLATE
unset LC_ALL
The FAQ that I pointed you to mentions this sort of treatment, or at least
refers you to the POSIX documentation which better explains it.
>
> After all, Australia uses the same character set and sort ordering as
> the US, the only difference between AU and EN is date format and the
> fact that Americans seem to have this habit of 'simplifying' the
> spelling of words.
Actually, whoever wrote the different locales also decided that the
collation values of the different locales would treat punctuation differently.
- --
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
iD8DBQFGe9UB84KuGfSFAYARAo+xAKDLG5sr7Axfl0qEgKweofyUVNtcnACgo40N
kpxC4O459LfikFXxk4SbgZ8=
=9lBA
-----END PGP SIGNATURE-----