[PATCH] kernel32: Respect the LANG environment variable on Mac OS.
ken at codeweavers.com
Wed Dec 2 10:05:55 CST 2009
On Dec 1, 2009, at 1:30 PM, Gert van den Berg wrote:
> My OS X settings is: (Language set to "English", "Formats" set to
> "South Africa")
> MoHaGLaptop:~ mohag$ locale
Are you using Terminal.app or some other terminal application? If
Terminal.app, have you turned off the "Set LANG environment variable
on startup" setting in preferences? (That's the name on Leopard. If
I recall, that setting is slightly different in Snow Leopard: "Set
locale environment variables on startup" or something like that.)
> On Tue, Dec 1, 2009 at 06:12, Ken Thomases <ken at codeweavers.com>
>> [...] Wine should just use the settings from System Preferences
>> directly (via CFLocale, CFNumberFormatter, and CFDateFormatter),
>> with an optional way to override them for those rare users who want
>> Wine's behavior to deviate from the system's.
> That makes sense to me... (If Wine tries to be a good OS X app under
> OS X, rather than a good POSIX app under OS X)
> (And what is suggested was current Wine settings of environment
> remained the same, LC_ALL (to allow for similar override everywhere),
> platform specific settings (e.g. individual settings from OS X's
> "Formats" settings), LC_* (which only contains specific settings, not
> "country" / "language"), LANG (for unset settings, and locale/country
> itself). On OS X this should mean that the variables other than LC_ALL
> only gets looked at if reading the OS X settings fail for some reason)
> For consistency with *nix override via LC_ALL makes sense (ignoring
> all other LC_*/LANG settings on OS X, in favour of OS X specific
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
System Preferences > LANG.
If one of the LC_* variables are set, that expresses user intent
(because 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.
More information about the wine-devel