[OpenIndiana-discuss] Locale problems in OI.... seems not to work???

James Carlson carlsonj at workingcode.com
Thu Apr 4 17:53:57 UTC 2013


On 04/04/13 13:37, Hans J. Albertsson wrote:
> Can someone point me to where in the OI source repository to find the
> sources involved for "locale" so I could see what the problem might be.
> I've tried to look it up, but there's no map of what is where, and I'd
> rather avoid downloading everything.

Googling "usr/src/cmd/locale" gets me to:

https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/locale/locale.c

> On 2013-04-04 19:15, Hans J. Albertsson wrote:
>> I'm having problems with the locale command.

I could swear I've answered this one before.



-------- Original Message --------
Subject: Re: [OpenIndiana-discuss] Locale questions in OI-151a7
Date: Wed, 13 Mar 2013 11:10:29 -0400
From: James Carlson <carlsonj at workingcode.com>
To: Discussion list for OpenIndiana <openindiana-discuss at openindiana.org>
CC: Hans J. Albertsson <hans.j.albertsson at branneriet.se>

On 03/13/13 10:40, Hans J. Albertsson wrote:
> Is this result really reasonable???
> I would have expected Å Ä Ö å ä ö to be classified as alpha in this
> locale....
>
>
>
>
>
> hans at klaus%81%15:37> locale
> LANG=sv_SE.ISO8859-15
> LC_CTYPE="sv_SE.ISO8859-15"
> LC_NUMERIC="sv_SE.ISO8859-15"
> LC_TIME="sv_SE.ISO8859-15"
> LC_COLLATE="sv_SE.ISO8859-15"
> LC_MONETARY="sv_SE.ISO8859-15"
> LC_MESSAGES="sv_SE.ISO8859-15"
> LC_ALL=sv_SE.ISO8859-15
> hans at klaus%82%15:37> locale -k alpha
>
alpha="A";"B";"C";"D";"E";"F";"G";"H";"I";"J";"K";"L";"M";"N";"O";"P";"Q";"R";\
>
>
"S";"T";"U";"V";"W";"X";"Y";"Z";"a";"b";"c";"d";"e";"f";"g";"h";"i";"j";"k";"l";"m";\
>
> "n";"o";"p";"q";"r";"s";"t";"u";"v";"w";"x";"y";"z"
> hans at klaus%83%15:37>

Looking at the source code for locale.c, I see this:

#define CSSIZE  128
[...]
prt_ctp(char *name)
[...]
        for (i = 0; i < CSSIZE; i++) {

... so, it just prints the mappings for the first 128 bytes, regardless
of the type of character set.  This doesn't mean that the actual
isalpha() doesn't work and doesn't include the national language
character set code points you're interested in -- it almost certainly
does -- it just means that the 'locale' program is too weak to show them
to you.

-- 
James Carlson         42.703N 71.076W         <carlsonj at workingcode.com>



-- 
James Carlson         42.703N 71.076W         <carlsonj at workingcode.com>



More information about the OpenIndiana-discuss mailing list