[PATCH] kernel32: Process input to WriteConsoleA according to CP_ACP.
Alex Henrie
alexhenrie24 at gmail.com
Sun May 24 22:33:03 CDT 2015
The A at the end of WriteConsoleA means that it's supposed to accept
input in the current "ANSI" codepage (which doesn't actually have to be
ANSI anything), not "whatever the console output codepage happens to be
set to".
Fixes https://bugs.winehq.org/show_bug.cgi?id=38638
---
dlls/kernel32/console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 14f1189..d0db05d 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -2493,7 +2493,7 @@ BOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber
LPWSTR xstring;
DWORD n;
- n = MultiByteToWideChar(GetConsoleOutputCP(), 0, lpBuffer, nNumberOfCharsToWrite, NULL, 0);
+ n = MultiByteToWideChar(CP_ACP, 0, lpBuffer, nNumberOfCharsToWrite, NULL, 0);
if (lpNumberOfCharsWritten) *lpNumberOfCharsWritten = 0;
xstring = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR));
--
2.4.1
More information about the wine-patches
mailing list