wscript: Use OEM code page for output.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-04-28 11:22:40 +02:00 committed by Alexandre Julliard
parent 98838aaf97
commit c277ef66fc
1 changed files with 2 additions and 2 deletions

View File

@ -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);