This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Various] libc/1468: [50 character or so descriptive subject here (for reference)]



We received the appended bug report.  I can reproduce the german
example - but I'm not sure whether this is a subtile glibc bug or a
usage error.

de and ja seem to be treated especially in the locale code.  The
problem is the addition of this alias in locale.alias: 
ja ja_JP.eucJP

and then moving the message catalogs to ja_JP.eucJP and running
LANG=ja some-program.

Should this work?

For details, please have a look at the appended emails.

Thanks,
Andreas



Topics:
   Re: libc/1468: [50 character or so descriptive subject here
   Re: libc/1468: [50 character or so descriptive subject here (for reference)]
   Re: libc/1468: [50 character or so descriptive subject here
   Re: libc/1468: [50 character or so descriptive subject here
   libc/1468: [50 character or so descriptive subject here (for reference)]


----------------------------------------------------------------------

Date: Mon, 29 Nov 1999 19:25:36 +0900
From: iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
To: Andreas Jaeger <aj@suse.de>
Subject: Re: libc/1468: [50 character or so descriptive subject here
 (for reference)]
Message-Id: <v0401011bb46805208d12@ma.ns.musashi-tech.ac.jp>
References: iNOUE Koich!'s message of "Mon, 29 Nov 1999 18:08:44
 +0900" <199911280103.KAA03771@minakanusi.ns.musashi-tech.ac.jp>
 <v04010112b467dbd3d691@ma.ns.musashi-tech.ac.jp>
 <v04010116b467f31c5081@ma.ns.musashi-tech.ac.jp>
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit

> Strange.  I can't reproduce it with a german locale :-( Can you send

I made de to be an alias of de_DE in locale.alias file, and moved
de/LC_MESSAGES/sharutils.mo into de_DE/LC_MESSAGES.   Then I got the
same result as in Japanese:

[root@/usr/share/locale]# LANG=de uudecode --help
Aufruf: uudecode [Dateien]...
Notwendige Argumente f$B{Q(B Optionen in Langform sind auch f$B{Q(B die
Kurzform notwendig.
  -h, --help                zeige diese Hilfe und beende
  -v, --version             zeige Versionsnummer und beende
  -o, --output-file=DATEI   leite Ausgabe in DATEI um
[root@/usr/share/locale]# mv de/LC_MESSAGES/sharutils.mo de_DE/LC_MESSAGES/
[root@/usr/share/locale]# LANG=de uudecode --help
Aufruf: uudecode [Dateien]...
Mandatory arguments to long options are mandatory to short options too.
  -h, --help               display this help and exit
  -v, --version            output version information and exit
  -o, --output-file=FILE   direct output to FILE
- -
								$B0f>e(B
			http://www.ns.musashi-tech.ac.jp/~inoue/Signature/


------------------------------

Date: 29 Nov 1999 11:01:14 +0100
From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
To: iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
Subject: Re: libc/1468: [50 character or so descriptive subject here (for reference)]
Message-ID: <u8hfi5k45x.fsf@gromit.rhein-neckar.de>
References: <199911280103.KAA03771@minakanusi.ns.musashi-tech.ac.jp> <v04010112b467dbd3d691@ma.ns.musashi-tech.ac.jp> <v04010116b467f31c5081@ma.ns.musashi-tech.ac.jp>
Content-Type: text/plain; charset=us-ascii

>>>>> iNOUE  writes:

>> Are you sure that those texts are translated?  What happens if you
>> copy sharutils.mo to /usr/share/locale/ja/LC_MESSAGES/sharutils.mo ?

 > Yes, it is translated.   I get full text in Japanese when I move it
 > into ja/LC_MESSAGES.

Strange.  I can't reproduce it with a german locale :-( Can you send
me your sharutils.mo, please?

Andreas
- - 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

------------------------------

Date: Mon, 29 Nov 1999 18:08:44 +0900
From: iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
To: Andreas Jaeger <aj@suse.de>
Subject: Re: libc/1468: [50 character or so descriptive subject here
 (for reference)]
Message-Id: <v04010116b467f31c5081@ma.ns.musashi-tech.ac.jp>
References: iNOUE Koich!'s message of "Mon, 29 Nov 1999 16:29:23
 +0900" <199911280103.KAA03771@minakanusi.ns.musashi-tech.ac.jp>
 <v04010112b467dbd3d691@ma.ns.musashi-tech.ac.jp>
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit

> Are you sure that those texts are translated?  What happens if you
> copy sharutils.mo to /usr/share/locale/ja/LC_MESSAGES/sharutils.mo ?

Yes, it is translated.   I get full text in Japanese when I move it
into ja/LC_MESSAGES.
- -
								$B0f>e(B
			http://www.ns.musashi-tech.ac.jp/~inoue/Signature/


------------------------------

Date: Mon, 29 Nov 1999 16:29:23 +0900
From: iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
To: Andreas Jaeger <aj@suse.de>
Subject: Re: libc/1468: [50 character or so descriptive subject here
 (for reference)]
Message-Id: <v04010112b467dbd3d691@ma.ns.musashi-tech.ac.jp>
References: iNOUE Koich!'s message of "Sun, 28 Nov 1999 10:03:59
 +0900" <199911280103.KAA03771@minakanusi.ns.musashi-tech.ac.jp>
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit

> Can you send me the strace output, please?

The following is the output.

[root@/usr/share/locale]# LANG=ja strace uudecode --help
execve("/usr/bin/uudecode", ["uudecode", "--help"], [/* 23 vars */]) = 0
brk(0)                                  = 0x804abd8
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_ISVTX|0677, st_size=0, ...}) = 0
mmap(0, 17752, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 974392, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40019000
mprotect(0x400ff000, 32312, PROT_NONE)  = 0
mmap(0x400ff000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xe5000) = 0x400ff000
mmap(0x40104000, 11832, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40104000
close(3)                                = 0
munmap(0x40014000, 17752)               = 0
personality(PER_LINUX)                  = 0
getpid()                                = 12904
brk(0)                                  = 0x804abd8
brk(0x804ac10)                          = 0x804ac10
brk(0x804b000)                          = 0x804b000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=031715, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40014000
read(3, "# Locale name alias data base.\n"..., 4096) = 2228
brk(0x804c000)                          = 0x804c000
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40014000, 4096)                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_MESSAGES", O_RDONLY) = 3
fstat(3, {st_mode=031716, st_size=0, ...}) = 0
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
fstat(3, {st_mode=031717, st_size=0, ...}) = 0
mmap(0, 42, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_MONETARY", O_RDONLY) = 3
fstat(3, {st_mode=031721, st_size=0, ...}) = 0
mmap(0, 93, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3)                                = 0
brk(0x804d000)                          = 0x804d000
open("/usr/share/locale/ja_JP.eucJP/LC_COLLATE", O_RDONLY) = 3
fstat(3, {st_mode=S_IFDIR|S_ISUID|S_ISVTX|0272, st_size=0, ...}) = 0
mmap(0, 412842, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40107000
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_TIME", O_RDONLY) = 3
fstat(3, {st_mode=031722, st_size=0, ...}) = 0
mmap(0, 508, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_NUMERIC", O_RDONLY) = 3
fstat(3, {st_mode=031723, st_size=0, ...}) = 0
mmap(0, 27, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_CTYPE", O_RDONLY) = 3
fstat(3, {st_mode=031724, st_size=0, ...}) = 0
mmap(0, 10424, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4016c000
brk(0x804e000)                          = 0x804e000
close(3)                                = 0
open("/usr/share/locale/ja_JP.eucJP/LC_MESSAGES/sharutils.mo", O_RDONLY) = 3
fstat(3, {st_mode=S_IFDIR|S_ISUID|0667, st_size=0, ...}) = 0
mmap(0, 14665, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4016f000
close(3)                                = 0
lstat("/usr", {st_mode=0, st_size=0, ...}) = 0
lstat("/usr/lib", {st_mode=0, st_size=0, ...}) = 0
lstat("/usr/lib/gconv", {st_mode=S_IFCHR|S_ISUID|S_ISGID|S_ISVTX|03,
st_rdev=makedev(124, 139), ...}) = 0
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 3
fstat(3, {st_mode=031415, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40018000
read(3, "# GNU libc iconv configuration.\n"..., 4096) = 4096
brk(0x804f000)                          = 0x804f000
read(3, "9-RO//\nmodule\tJIS_C6220-1969-R"..., 4096) = 4096
brk(0x8050000)                          = 0x8050000
brk(0x8051000)                          = 0x8051000
brk(0x8052000)                          = 0x8052000
read(3, "O8859-3\t1\nmodule\tINTERNAL\t\t"..., 4096) = 4096
brk(0x8053000)                          = 0x8053000
brk(0x8054000)                          = 0x8054000
read(3, "\tSJIS//\nalias\tCSSHIFTJIS//\t\t"..., 4096) = 4096
brk(0x8055000)                          = 0x8055000
brk(0x8056000)                          = 0x8056000
read(3, "/\nalias\tCSIBM273//\t\tIBM273//"..., 4096) = 4096
brk(0x8057000)                          = 0x8057000
brk(0x8058000)                          = 0x8058000
read(3, "\tINTERNAL\t\tIBM855\t\t1\nmodul"..., 4096) = 4096
brk(0x8059000)                          = 0x8059000
brk(0x805a000)                          = 0x805a000
brk(0x805b000)                          = 0x805b000
read(3, "le\t\tcost\nalias\tCP1026//\t\tI"..., 4096) = 4096
brk(0x805c000)                          = 0x805c000
brk(0x805d000)                          = 0x805d000
read(3, "as\tARABIC7//\t\tASMO_449//\nali"..., 4096) = 4096
brk(0x805e000)                          = 0x805e000
brk(0x805f000)                          = 0x805f000
read(3, "EFI//\t\tNATS-SEFI//\nmodule\tNA"..., 4096) = 716
brk(0x8060000)                          = 0x8060000
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
open("/usr/lib/gconv/EUC-JP.so", O_RDONLY) = 3
fstat(3, {st_mode=S_ISUID|S_ISGID|0406, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 13776, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40173000
mprotect(0x40176000, 1488, PROT_NONE)   = 0
mmap(0x40176000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x2000) = 0x40176000
close(3)                                = 0
open("/usr/lib/gconv/i586/libJIS.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat("/usr/lib/gconv/i586", 0xbfffe2f8) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/libJIS.so", O_RDONLY) = 3
fstat(3, {st_mode=S_ISUID|S_ISGID|0507, st_size=0, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3"..., 4096) = 4096
mmap(0, 100068, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40177000
mprotect(0x4018f000, 1764, PROT_NONE)   = 0
mmap(0x4018f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x17000) = 0x4018f000
close(3)                                = 0
fstat(1, {st_mode=S_IFREG|S_ISUID|01, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40018000
ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
write(1, "\273\310\315\321\313\241: uudeco"..., 31$B;HMQK!(B: uudecode [$B%U(B
$B%!%$%k(B]...
) = 31
open("/usr/share/locale/ja/LC_MESSAGES/sharutils.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
write(1, "Mandatory arguments to long opti"..., 238Mandatory arguments
to long options are mandatory to short options too.
  -h, --help               display this help and exit
  -v, --version            output version information and exit
  -o, --output-file=FILE   direct output to FILE
) = 238
munmap(0x40018000, 4096)                = 0
_exit(0)                                = ?
[root@/usr/share/locale]#
- -
								$B0f>e(B
			http://www.ns.musashi-tech.ac.jp/~inoue/Signature/


------------------------------

Date: Sun, 28 Nov 1999 10:03:59 +0900
From: iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
To: bugs@gnu.org
Subject: libc/1468: [50 character or so descriptive subject here (for reference)]
Message-Id: <199911280103.KAA03771@minakanusi.ns.musashi-tech.ac.jp>


>Number:         1468
>Category:       libc
>Synopsis:       gettext can't expand locale alias twice
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Sat Nov 27 20:10:01 EST 1999
>Last-Modified:
>Originator:     INOUE Koichi
>Organization:
Musashi Institute of Technology
>Release:        libc-2.1.1
>Environment:
i586 linux
Host type: i386-redhat-linux-gnu
System: Linux minakanusi 2.2.5-15 #1 Mon Apr 19 22:21:09 EDT 1999 i586 unknown
Architecture: i586

Addons: crypt glibc-compat linuxthreads
Build CFLAGS: -g -O3
Build CC: egcs
Compiler version: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Kernel headers: 2.2.5-15
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
I found gnu gettext routine doesnot expand locale alias second time.   I use LANG=ja without LANGUAGE and LC_*.
My locale.alias file contains a line which makes ja to be an alias name of ja_JP.eucJP.  I recently change locale
data directory from ja to ja_JP.eucJP since your glibc seems to use this locale name.
In this situation, I did 'uudecode --help' and got a message whose first line was Japanese translated text but
the remainig lines were in English.   So I traced with strace program, then found gettext searched in
/usr/share/locale/ja_JP.eucJP/LC_MESSAGES/sharutils.mo for the first line but, for the second time, it searched in
/usr/share/locale/ja/LC_MESSAGES/sharutils.mo which did not exist.
>How-To-Repeat:
message catalog:
ja_JP.eucJP/LC_MESSAGES/sharutils.mo

locale.alias:
ja	ja_JP.eucJP

environment variables:
LANG=ja

command:
strace uudecode --help
>Fix:
Sorry, I don't know.
>Audit-Trail:
>Unformatted:


------------------------------

End of forwardIGAevl Digest
***************************



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]