[PATCH] kernel32: Output message to stderr in UTF-8

Alex Henrie alexhenrie24 at gmail.com
Wed Oct 19 00:51:35 CDT 2011


Fixes a bug in which the command "wine /." outputs "wine: M�nec inv�lid" to stderr instead of "wine: Mànec invàlid"
---
 dlls/kernel32/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index c540f44..0a38181 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1253,7 +1253,7 @@ void CDECL __wine_kernel_init(void)
         args[0] = (DWORD_PTR)main_exe_name;
         FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY,
                         NULL, error, 0, msgW, sizeof(msgW)/sizeof(WCHAR), (__ms_va_list *)args );
-        WideCharToMultiByte( CP_ACP, 0, msgW, -1, msg, sizeof(msg), NULL, NULL );
+        WideCharToMultiByte( CP_UTF8, 0, msgW, -1, msg, sizeof(msg), NULL, NULL );
         MESSAGE( "wine: %s", msg );
         ExitProcess( error );
     }
-- 
1.7.4.1





More information about the wine-patches mailing list