Module: wine Branch: master Commit: 4fdfa29e604070f9fd504cc62bcc877cea42fe09 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4fdfa29e604070f9fd504cc62b...
Author: Piotr Caban piotr@codeweavers.com Date: Tue May 31 11:56:42 2016 +0200
kernel32: Use utf8 for filenames encoding if different encoding was not specified on Mac.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Ken Thomases ken@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/locale.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index b5a8680..f4ff6d3 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3646,7 +3646,6 @@ void LOCALE_Init(void) CFStringGetCString( user_locale_string_ref, user_locale, sizeof(user_locale), kCFStringEncodingUTF8 ); strcat(user_locale, ".UTF-8");
- unix_cp = CP_UTF8; /* default to utf-8 even if we don't get a valid locale */ setenv( "LANG", user_locale, 0 ); TRACE( "setting locale to '%s'\n", user_locale ); #endif /* __APPLE__ */ @@ -3657,6 +3656,9 @@ void LOCALE_Init(void) if (!lcid_LC_MESSAGES) lcid_LC_MESSAGES = lcid_LC_CTYPE;
#ifdef __APPLE__ + if (!unix_cp) + unix_cp = CP_UTF8; /* default to utf-8 even if we don't get a valid locale */ + /* Override lcid_LC_MESSAGES with user's preferred language if LC_MESSAGES is set to default */ if (!getenv("LC_ALL") && !getenv("LC_MESSAGES")) {