From: Jactry Zeng <jzeng(a)codeweavers.com> --- dlls/ntdll/unix/env.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 6b249917cfe..c88357b1b68 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -833,6 +833,7 @@ static void init_locale(void) { CFStringRef lang = CFDictionaryGetValue( components, kCFLocaleLanguageCode ); CFStringRef country = CFDictionaryGetValue( components, kCFLocaleCountryCode ); + CFStringRef script = CFDictionaryGetValue( components, kCFLocaleScriptCode ); CFLocaleRef mac_user_locale = NULL; CFStringRef locale_string; @@ -841,7 +842,11 @@ static void init_locale(void) mac_user_locale = CFLocaleCopyCurrent(); country = CFLocaleGetValue( mac_user_locale, kCFLocaleCountryCode ); } - if (country) + if (country && script) + locale_string = CFStringCreateWithFormat( NULL, NULL, CFSTR("%@-%@-%@"), lang, script, country ); + else if (!country && script) + locale_string = CFStringCreateWithFormat( NULL, NULL, CFSTR("%@-%@"), lang, script ); + else if (country && !script) locale_string = CFStringCreateWithFormat( NULL, NULL, CFSTR("%@-%@"), lang, country ); else locale_string = CFStringCreateCopy( NULL, lang ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4357