[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#55913: liblocale-gettext-perl: setlocale(LC_ALL, "de") doesn't work but $ENV{'LC_ALL'} = "de" does



On Sun, Jan 23, 2000 at 05:44:51PM +0100, Raphael Hertzog wrote:
> Le Sun, Jan 23, 2000 at 12:05:13PM +0100, Thierry Laronde écrivait:
> > Hello,
> > 
> > I'm not quite sure this isn't normal ( I mean for setlocale()). The POSIX 
> > specification tells that you must use ll_UU (example fr_FR) to set the locale. 
> No check my mail :
> 
> > $LANG="" ltrace -e setlocale perl -w -MPOSIX -MLocale::gettext -le    
> > 'setlocale(LC_ALL, "de_DE"); textdomain("libc"); print gettext("Interrupt");'
>                      ^^^^^^^
> 
> And I still get French or C locale ...

Ok. I had first looked at the syntax used by the bug reporter.

But I'm a bit confused. The `ltrace' report that you have shown 
traces only the first library calls of Perl by itself.

I have tried to figure out if setlocale was actually called. The answer is
yes :

$ LC_ALL=fr_FR ltrace -e setlocale perl -w -MPOSIX -le 'use locale; $value_passed = setlocale(LC_ALL,"de_DE"); print $value_passed; print $ENV{"LC_ALL"};'
setlocale(6, "")                                  = "fr_FR"
setlocale(0, NULL)                                = "fr_FR"
setlocale(3, NULL)                                = "fr_FR"
setlocale(1, NULL)                                = "fr_FR"
setlocale(1, "C")                                 = "C"
de_DE
fr_FR
+++ exited (status 0) +++

But it looks like if the new value was not "exported". The process seems to be
made for the call of setlocale by itself, but not for the "parent" process.

Weird.

Cheers,
-- 
Thierry LARONDE
thierry.laronde@polynum.com
website : http://www.polynum.com


Reply to: