Jean-Marc Lasgouttes wrote:
Michael> 2. AFAICS setlocale returns NULL on Windows/MinGW even if it
Michael> shouldn't. However, querying the environment variables via
Michael> getEnv() works.
How are your locale environment variables setup under mingw? It seems
that you should use "German" instead of de_DE under windows.
No, "de_DE" works just fine.
Look here for example:
http://sourceforge.net/mailarchive/message.php?msg_id=9626656
Ha! They also suggest using getEnv rather than setlocale.
Michael> You could say that this is a bug in MinGW but please note
Michael> that we also check for (multiple!) environment variables at a
Michael> different place in the code! I don't understand we do it once
Michael> this way and once the other way.
The code that checks for environment variables is used to look for
translated documentation. This code mimics what gettext does to find
the current locale, because gettext does not give us direct access to
this information. If we are going to duplicate this code, it should
definitely be factored somewhere.
I am not sure whether I get your point. Do you support my patch or do
you propose something different? Please note that the code is indeed
factored out in my patch.
Michael