Commit 9dc5d299 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

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: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 19d8fcc4
......@@ -985,6 +985,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment