summaryrefslogtreecommitdiffstats
path: root/Source/cm_codecvt.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-28 23:47:24 (GMT)
committerBrad King <brad.king@kitware.com>2022-10-29 00:23:25 (GMT)
commite1c16791481f1741d65cb98878d8171307422513 (patch)
treef639e3ff8eae2428cff2cc493f9381ff875ebe93 /Source/cm_codecvt.cxx
parent328c15189d661503fbf6561731e550064e6a5567 (diff)
downloadCMake-e1c16791481f1741d65cb98878d8171307422513.zip
CMake-e1c16791481f1741d65cb98878d8171307422513.tar.gz
CMake-e1c16791481f1741d65cb98878d8171307422513.tar.bz2
cm_codecvt: Add support for the Windows console output code page
This is distinct from the Windows ANSI code page.
Diffstat (limited to 'Source/cm_codecvt.cxx')
-rw-r--r--Source/cm_codecvt.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index 8115306..2d2a377 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -19,6 +19,12 @@ codecvt::codecvt(Encoding e)
#endif
{
switch (e) {
+ case codecvt::ConsoleOutput:
+#if defined(_WIN32)
+ m_noconv = false;
+ m_codepage = GetConsoleOutputCP();
+ break;
+#endif
case codecvt::ANSI:
#if defined(_WIN32)
m_noconv = false;