This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: bad side-effects of new locale design
Original message (Ulrich Drepper, Tue, September 5, 2000, 09:33:44 GMT):
> Stanislav Brabec <utx@penguin.cz> writes:
>
> > Examples (I have strace without locale support):
> > LANG=C LANGUAGE=czech strace /
> > execve("/", ["/"], [/* 47 vars */]) = 0
> > strace: exec: P??stup odm?tnut
It was my OOPS. I was copied bad string! There is what I wanted to report as 1):
LANG=czech LANGUAGE=czech strace /
strace: exec: P??stup odm?tnut
execve("/", ["/"], [/* 47 vars */]) = 0
> > Because (for example Czech) messages are stored in directory
> > @datadir@/locale/cs/LC_MESSAGES, and new locale is stored in
> > @libdir@/locale/cs_CZ, if used LANG=cs instead of LANG=czech, message
> > catalogs are recognized, but locale not
> > (if LANG is set to czech, all is correct):
>
> This doesn't make any sense. What do the directories and the locale
> aliases have to do with each other?
>
Locale aliases (e.g. "czech") works OK. Locale abreviations (e.g. "cs")
without country have problems.
Message catalogs are found for all possible ways to specify LANG
(czech, cs, cs_CZ, cs_CZ.ISO-8859-2), but locales only for
variants czech, cs_CZ, cs_CZ.ISO-8859-2, but not for cs.
The rest of mail contains only strace logs with lists on searched directories.
I'll do:
LANG=czech strace -o tartr tar ; grep open tartr
.......
open("/usr/lib/locale/cs_CZ.ISO-8859-2/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/i18n/cs_CZ.ISO-8859-2/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/cs_CZ.iso88592/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/i18n/cs_CZ.iso88592/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/cs_CZ/LC_CTYPE", O_RDONLY) = 4
open("/usr/share/locale/cs_CZ.ISO-8859-2/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs_CZ.iso88592/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs_CZ/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs.ISO-8859-2/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs.iso88592/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs/LC_MESSAGES/tar.mo", O_RDONLY) = 4
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 4
open("/usr/lib/gconv/ISO8859-2.so", O_RDONLY) = 4
All worked OK. Locale was found in /usr/lib/locale/cs_CZ and catalogs in /usr/share/locale/cs.
And now:
LANG=cs strace -o tartr tar ; grep open tartr
.......
open("/usr/lib/locale/cs/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/i18n/cs/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs_CZ.ISO-8859-2/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs_CZ.iso88592/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs_CZ/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs.ISO-8859-2/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs.iso88592/LC_MESSAGES/tar.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/cs/LC_MESSAGES/tar.mo", O_RDONLY) = 4
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 4
open("/usr/lib/gconv/ISO646.so", O_RDONLY) = 4
open("/usr/lib/gconv/ISO8859-2.so", O_RDONLY) = 4
Locale wasn't found but message catalogs was in /usr/share/locale/cs.
--
Stanislav Brabec