bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: win gettext / setlocale problem


From: Bruno Haible
Subject: Re: win gettext / setlocale problem
Date: Fri, 15 Jul 2005 14:11:42 +0200
User-agent: KMail/1.5

Gustavo Sanchez wrote:
>       I have a little problem using gnu gettext in win environmet. I'm using
> VC++7.0 (ms), and I can't change the locale in run time. I've read
> http://www.haible.de/bruno/gettext-FAQ.html#windows_setenv once and
> another, I followed the instructions step by step but it doesn't work. If I
> do a set LANG=fr in a command window the programs uses the corren locale,
> but if I do a setlocale(LC_ALL,"fr") do nothing (my computer uses spanish
> by default). I use  localDir() to get the l10n directory, which is  the
> executable file dir, from here there are a ./es/LC_MESSAGES and
> ./fr/LC_MESSAGES and here a msg-cajas.mo file. any help?

On Woe32, the runtime library depends on the compiler (and even on whether
you turn on "debug mode" or not!). Some people have reported that they have
the same problem if they use a different compiler than the one that was used
to build intl.dll. Namely, the putenv() that you call will modify the
environment stored in the MSVC7 libraries, whereas the getenv() in intl.dll
will fetch them from the MSVC6 libraries. Or similar. The solution is to
use the same compiler to build both intl.dll and your code, or to
compile a putenv() wrapper function with the same compiler as intl.dll was
built with.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]