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

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

Regards,

-Roberto

-- 
Roberto C. Sánchez


Reply to: