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

Re: locales and accented charaters



On Wed, Oct 30, 2002 at 01:30:50PM -0500, Nori Heikkinen wrote:
> export LANG=en_US
> export LC_COLLATE=C 
> 
> and then, locale still does this:
> 
> orange:~> locale
> LANG=en_US
> LC_CTYPE="en_US"
> LC_NUMERIC="en_US"
> LC_TIME="en_US"
> LC_COLLATE="en_US"
> LC_MONETARY="en_US"
> LC_MESSAGES="en_US"
> LC_PAPER="en_US"
> LC_NAME="en_US"
> LC_ADDRESS="en_US"
> LC_TELEPHONE="en_US"
> LC_MEASUREMENT="en_US"
> LC_IDENTIFICATION="en_US"
> LC_ALL=en_US
> 
> exporting variables (like LC_COLLATE) from the command line does not
> appear to modify the output of locale.  if i can't fix this, i'm going
> back to aliasing ls to `LC_ALL=C ls`, which would be obnoxious,
> because then accented characters wouldn't be ?s in listings.  

Wed Oct 30 -- 22:04:30 -- scaprea:/fsb/home/simon
>export LC_COLLATE=C
Wed Oct 30 -- 22:04:44 -- scaprea:/fsb/home/simon
>locale
LANG=en_US.iso8859-1
LC_CTYPE="en_US.iso8859-1"
LC_NUMERIC="en_US.iso8859-1"
LC_TIME="en_US.iso8859-1"
LC_COLLATE=C
LC_MONETARY="en_US.iso8859-1"
LC_MESSAGES="en_US.iso8859-1"
LC_ALL=

So for me exporting LC_COLLATE works. AFAIK, if only LANG is set, all
locale categories are derived from that. If one of the LC_* is set,
that category is derived from the environment variable.

Note that my LANG variable includes the default character encoding. It
may also be utf-8.

See locale(1). I do not know whether programs use it. See setlocale(5)
for what programs may do.

Good luck, Sammy

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl



Reply to: