Jari Aalto wrote:
> Michael Stone writes:
> > You aren't sorting in ascii order, you're sorting in en_DK.UTF-8
> > order. If you want to change that, set LC_COLLATE=C
> 
> This isn't documented in the ls(1) manual. According to your tip, I
> noticed that the sort(1) page page reads:
> 
>        *** WARNING *** The locale specified by the environment affects
>        sort order. Set LC_ALL=C to get the traditional sort order that
>        uses native byte values.
> 
> It would be good if ls(1) carried similar paragraph.

I am sure that the ls documentation would benefit from having it.

The problem is that system locale sorting is very global and affects
almost every command on the system.  At least any that do sorting and
a lot of things do sorting.  The shell for example.

  $ echo *

But perhaps this will be easier to read:

  $ echo * | tr ' ' '\n' | less

So when a system configuration affects *everything* does that mean
that /everything/ must document it?

Note that this is an upstream FAQ entry.

  
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

Bob



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to