From c277ef66fc1d4c5cbebd07d389f4c789b113f3b8 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Thu, 28 Apr 2022 11:22:40 +0200 Subject: [PATCH] wscript: Use OEM code page for output. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- programs/wscript/host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index bd16b7b4cbe..463f5ee7aa6 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -80,12 +80,12 @@ static void print_string(const WCHAR *string) return; } - lena = WideCharToMultiByte(GetConsoleOutputCP(), 0, string, len, NULL, 0, NULL, NULL); + lena = WideCharToMultiByte(GetOEMCP(), 0, string, len, NULL, 0, NULL, NULL); buf = heap_alloc(len); if(!buf) return; - WideCharToMultiByte(GetConsoleOutputCP(), 0, string, len, buf, lena, NULL, NULL); + WideCharToMultiByte(GetOEMCP(), 0, string, len, buf, lena, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), buf, lena, &count, FALSE); heap_free(buf); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), "\r\n", 2, &count, FALSE);