We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1ba2130 + 95e89e9 commit 9c5469bCopy full SHA for 9c5469b
2 files changed
docs/changelog.txt
@@ -33,6 +33,7 @@ Template for new versions:
33
## New Features
34
35
## Fixes
36
+- Core: Windows console will always use UTF-8 regardless of system code page settings
37
38
## Misc Improvements
39
library/Console-windows.cpp
@@ -474,6 +474,10 @@ bool Console::init(bool)
474
HMENU hm = GetSystemMenu(d->ConsoleWindow,false);
475
DeleteMenu(hm, SC_CLOSE, MF_BYCOMMAND);
476
477
+ // force console code pages to utf-8
478
+ SetConsoleCP(CP_UTF8);
479
+ SetConsoleOutputCP(CP_UTF8);
480
+
481
// set the screen buffer to be big enough to let us scroll text
482
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
483
d->default_attributes = coninfo.wAttributes;
0 commit comments