Re: ls -la sort order
- Date: Wed, 3 Oct 2018 12:47:41 -0400
- From: Roberto C. Sánchez <roberto@xxxxxxxxxx>
- Subject: Re: ls -la sort order
On Wed, Oct 03, 2018 at 12:31:01PM -0400, Lee wrote:
> interesting... I get different results for 'ls [D-M]*' if LC_COLLATE=C
> or LC_COLLATE=en_US.utf8
Think of it this way:
en_US.utf8 -> sort in alphabetical order
C -> sort in ASCII-betical order
In ASCII, all of the capital letters precede all of the lowercase
letters. In US English, there is not a sorting distinction between a
capital and its matching lowercase, so they are considered equivalent.
Said another way, in ASCII 'A' != 'a', but en_US.utf8 'A' == 'a' (and
probably in every locale that uses Latin-1 as a base).
Roberto C. Sánchez