Jacek Caban : fsutil: Use CP_ACP for non-console output encoding.
Alexandre Julliard
julliard at winehq.org
Fri Nov 13 15:57:52 CST 2020
Module: wine
Branch: master
Commit: f24499ebffce8afdddc12d72377af2f617eafe2c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f24499ebffce8afdddc12d72377af2f617eafe2c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Nov 12 20:38:03 2020 +0100
fsutil: Use CP_ACP for non-console output encoding.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/fsutil/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/fsutil/main.c b/programs/fsutil/main.c
index 0bc8817b88f..e4c036f9650 100644
--- a/programs/fsutil/main.c
+++ b/programs/fsutil/main.c
@@ -38,11 +38,11 @@ static void output_write(const WCHAR *str, DWORD wlen)
* back to WriteFile(), assuming the console encoding is still the right
* one in that case.
*/
- len = WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, NULL, 0, NULL, NULL);
+ len = WideCharToMultiByte(CP_ACP, 0, str, wlen, NULL, 0, NULL, NULL);
msgA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char));
if (!msgA) return;
- WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, str, wlen, msgA, len, NULL, NULL);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
HeapFree(GetProcessHeap(), 0, msgA);
}
More information about the wine-cvs
mailing list