Re: Env-locale problems
On Mon, Jan 05, 2004 at 08:53:23AM +0100, Jan Minar wrote:
> On Sun, Jan 04, 2004 at 04:58:50PM +0000, Colin Watson wrote:
> > On Sun, Jan 04, 2004 at 03:54:29PM +0100, David Baron wrote:
> > > Most everything I try to do, packages, compiles, etc., kick on the env locale.
> > >
> > > They say make sure your environment has (and the kernel supports):
> > > LANG=en_ENus
> > > LC not set
> > > LANGUAGE=en_us
> >
> > en_US, not either en_ENus or en_us. Also make sure you've enabled that
>
> IIRC, en_US is the canonical version, but at the end of the day, the
> capitalization doesn't matter, nor do some non-alphabetical characters.
> They are treated equally by the C library routines. I poke around the
> manpages, but was unable to verify this. Am I wrong, Colin?
As far as I can tell I'm afraid you're wrong. Quickest example I can
think of:
[cjwatson@cairhien ~/tmp]$ mkdir locale
[cjwatson@cairhien ~/tmp]$ cd locale
[cjwatson@cairhien ~/tmp/locale]$ touch a B
[cjwatson@cairhien ~/tmp/locale]$ echo $LC_COLLATE
C
[cjwatson@cairhien ~/tmp/locale]$ ls
B a
[cjwatson@cairhien ~/tmp/locale]$ LC_COLLATE=en_GB ls
a B
[cjwatson@cairhien ~/tmp/locale]$ LC_COLLATE=en_gb ls
B a
Looking briefly through glibc/locale, it generally seems to use
strcmp(), not strcasecmp().
Cheers,
--
Colin Watson [cjwatson@flatline.org.uk]
Reply to: