Re: Locale en_US and sorting order
email@example.com (Bob Proulx) writes:
> Carl Johnson <firstname.lastname@example.org> [2002-09-02 16:00:21 -0700]:
> > I have been using the locale en_US.UTF-8 for unicode, and I noticed
> > that the sorting order is different than the default 'C' locale. With
> > en_US the case is folded, so 'A' sorts the same as 'a', but with the
> > 'C' locale the uppercase always come before lowercase. I don't just
> > mean the sort program, but also the output of ls and file globbing.
> ??? Yes. You seem to understand.
> > I've been using different versions of unix for 15-20 years and the old
> > system is thoroughly burned into my brain, so I would like to get it
> > back. Does anybody know how to change back, or is the current system
> > even considered a bug?
> One of the below should restore standard behavor. Are you saying you
> want standard behavior or do you want something different such as
> dictionary sort order.
> unset LANG
> export LANG=POSIX
> export LC_ALL=POSIX
> If you want standard then you have to have a standard environment. If
> you want dictionary sorting order then set LANG=en_US and have a
> non-standard but dictionary sort order. It is your environment and
> you get to choose how you want to customize it.
So what is the recommended way to use a standard environment with
unicode character set? Should I be using something like LANG=C and
LC_CTYPE=en_US.UTF-8, or is there a better way? And what if I want to
use a standard environment, except with a foreign language? Do all
national language environments have the same problem as en_US? Your
statements make it appear that anything other than ASCII is
nonstandard and can be drastically different than the POSIX
If you know of some document that answer the above questions and how
to use locales in general, it would probably be better if you could
just mention where to find that instead.
Carl Johnson email@example.com