View Single Post

   
  #6 (permalink)  
Old 05-07-2008, 07:19 PM
Colin B.
 
Posts: n/a
Default Re: Bizarre reversed sort order?

Jim Leonard <MobyGamer@gmail.com> wrote:
> On May 7, 9:37 am, Jim Leonard <MobyGa...@gmail.com> wrote:
>> > > On only *two* of our dozens of Solaris 9 machines, we are seeing very
>> > > odd behavior from /usr/bin/sort.

>>
>> > Whenever you see sort oddities, think "locale".

>>
>> Sure enough, that's it! Thanks for the help!

>
> On further investigation, it appears as if LOCALE is not getting set
> up on a few machines, which is confusing since TZ, which is also in /
> etc/default/init, *is* set up. For example:
>
> root# cat /etc/default/init
> TZ=US/Central
> CMASK=022
> LC_COLLATE=en_US.ISO8859-1
> LC_CTYPE=en_US.ISO8859-1
> LC_MESSAGES=C
> LC_MONETARY=en_US.ISO8859-1
> LC_NUMERIC=en_US.ISO8859-1
> LC_TIME=en_US.ISO8859-1
> root# echo $TZ
> US/Central
> root# echo $LC_COLLATE
>
> root#
>
> What could be causing this? Are they never getting set, or are they
> getting UNset by something? I thought init would set these vars on
> every process spawn so why are some there and some aren't?


Are you running in a graphical environment? It's been a while since I've
looked at CDE, but Gnome will get a default locale and use it to populate
the entire LC_* environment. I believe LANG is what it uses for the
default. You can choose a different locale from the login page (under the
options dropdown), but it will again use that for _all_ LC_* variables.

This is one of a number of horrible locale-related things I've been
delving into lately. Ugh.

Colin
Reply With Quote