This is the mail archive of the libc-alpha@sources.redhat.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]

Re: The behavor of printing out libc message catalog without calling setlocale()


X-PMC-CI-e-mail-id: 14009 

>Having said this, there is a loophole.  If the user set the LANGUAGE
>environment variable the requested translation is always used.  I'm
>not especially happy about this but don't see a way to not do this.

I am not happy about this loophole either.

I have been bitten once when I tried to install VMware
on a linux distribution.
I had a problem when I tried the installation and figured
it is the output of df that was translated into Japanese strings.
So based on my previous experience with other C libraries, 
I reset LANG and LC_ALL (I looled at the output of env and reset
seemingly related variables, and obviously missed LANGUAGE.) and 
such to 'C' and still no luck.
Only later, someone told me about this LANGUAGE setting.
(It had been set to one of the Japanese locales.)

Has this loophole been documented in a clearly visible manner in the
glibc documentation?
(Actually, I think this loophole can bite many users 
in one way or the other in the future.)

>Also, it might help in situations like yours.

Surely. 

But when I was bitten by this loophole, I had thought
that most of the programs already called setlocale() and this
was why the output of various programs got translated. I was wrong.

This loophole saves the transition in a way, but
also gives the programming community excuses not to
insert necessary setlocale() calls in the favorite programs any time
soon. 

I wonder how people evaluate the the merit and demerit of this
loophole.


-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051



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