From f24499ebffce8afdddc12d72377af2f617eafe2c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 12 Nov 2020 20:38:03 +0100 Subject: [PATCH] fsutil: Use CP_ACP for non-console output encoding. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- 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); }