[PATCH] kernel32: Respect the LANG environment variable on Mac OS.
ken at codeweavers.com
Wed Dec 2 14:52:33 CST 2009
On Dec 2, 2009, at 1:22 PM, Gert van den Berg wrote:
> I'm using Terminal.app using default settings (AFAIK, except for
> colors). "Set locale variables at startup" is enabled.
> I don't see settings for en_ZA* in /usr/share/locale (af_ZA does
> exist, but if my applications turn Afrikaans I'll go insane ;-) ) (And
> OS X does not have a language settign for Afrikaans)
Apparently Terminal.app won't set LANG to a locale that's not in /usr/
>> Actually, I think that Wine should respect the LC_* variables if
>> they are
>> set. So, the precedence order would be LC_ALL > LC_* > Mac OS X
>> Preferences > LANG.
> As far as I can figure out, no LC_* variable, except LC_ALL specific
> the actual locale? They only determine individual settings, which
> overwrites the default for the locale, as set by LANG? (Not sure if it
> effectively means set everything to LANG's locale, overwrite
> individual settings from LC_* if they are defined)
I'm not sure what you mean here. Are you referring to the general
Unix meaning of these variables or Wine's use of them?
As near as I can tell, Wine only probes the locale information by
invoking setlocale(<category>, NULL). It doesn't directly examine the
environment variables. Furthermore, it only queries using the
individual categories, not LC_ALL. It uses setlocale(LC_ALL, "") once
to tell the C library to initialize itself from the environment.
So, I'm not sure how setting all of the LC_* variables to a given
value can be different from setting LC_ALL to that value.
>> If one of the LC_* variables are set, that expresses user intent
>> those variables are not set by Terminal.app automatically). Also,
>> it is
>> useful to allow the user to override the System Preferences on a
>> category-by-category basis.
> Mine gets set to C / UTF-8(for LC_CTYPE) of some reason...
Maybe Terminal.app is setting LC_CTYPE when it can't set LANG. Check
what's actually set in your environment:
env | egrep "^(LANG|LC_)"
More information about the wine-devel