[OpenIndiana-discuss] Locale questions in OI-151a7
James Carlson
carlsonj at workingcode.com
Wed Mar 13 15:10:29 UTC 2013
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>
More information about the OpenIndiana-discuss
mailing list