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

Re: Setting environment: $LC_*, $LANG, LC_ALL, LANGUAGE



James Hughes <jhughes@kos.net> [2002-08-16 08:23:40 -0400]:
> After a recent upgrade, some applications are complaining about
> certain environment variables not being set. Specifically, man
> complains "can't set the locale; make sure $LC_* and $LANG are
> correct", and perl prints the following:
> 
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = (unset),
>         LC_ALL = (unset),
>         LANG = "en_US.UTF-8"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
> 
> I guess the two main offenders would be LANGUAGE and LC_ALL. What are
> reasonable values to set these variables to?		

What is the output of 'locale' in your environment?

This above output looks like you have LANG=en_US.UTF-8 but that the
locale en_US.UTF-8 is not installed on your system.  Therefore you
could fix that by either installing the locale or setting LANG to be
something else.  I recommend unsetting LANG or setting it to C or
POSIX to ensure standard behavior.  YMMV.

Note that if you set LANG to en_US then sort, ls, etc. any command
that does any character sorting will sort in a "dictionary" order.
Non-alpha characters will be ignored and case will be folded.  If that
is what you want then great, locales are doing what they are designed
to do.  But most people report it as a bug against ls and sort because
they don't realize the connection to LANG.

  http://www.gnu.org/software/fileutils/doc/faq/#Sort%20does%20not%20sorting%20in%20normal%20order!

Bob

Attachment: pgpk4eb9k7X0k.pgp
Description: PGP signature


Reply to: