mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[WINESYNC] kernel32: Improve locale detection on Android.
setlocale is coded to just return 'C' for all inquiries ignoring locale that may be set in the environment. Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 9dc5d299f11c599862d39af3e32d92e787c1ae7b by Aric Stewart <aric@codeweavers.com>
This commit is contained in:
parent
535fffd824
commit
a8d367089c
1 changed files with 9 additions and 0 deletions
|
@ -1015,6 +1015,15 @@ static const char* get_locale(int category, const char* category_name)
|
|||
{
|
||||
const char* ret = setlocale(category, NULL);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
if (!strcmp(ret, "C"))
|
||||
{
|
||||
ret = getenv( category_name );
|
||||
if (!ret || !ret[0]) ret = getenv( "LC_ALL" );
|
||||
if (!ret || !ret[0]) ret = "C";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* If LC_ALL is set, respect it as a user override.
|
||||
If LC_* is set, respect it as a user override, except if it's LC_CTYPE
|
||||
|
|
Loading…
Reference in a new issue