From 62c961afdfba36d53caee59e804425ab477a1356 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 12 Nov 2020 20:37:57 +0100 Subject: [PATCH] attrib: Use CP_ACP for non-console output encoding. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- programs/attrib/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 53f63020973..4813443449b 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -104,7 +104,7 @@ static int WINAPIV ATTRIB_wprintf(const WCHAR *format, ...) } /* Convert to OEM, then output */ - convertedChars = WideCharToMultiByte(GetConsoleOutputCP(), 0, output_bufW, + convertedChars = WideCharToMultiByte(CP_ACP, 0, output_bufW, len, output_bufA, MAX_WRITECONSOLE_SIZE, "?", &usedDefaultChar); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), output_bufA, convertedChars,