Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Template for new versions:
## New Features

## Fixes
- Core: Windows console will always use UTF-8 regardless of system code page settings

## Misc Improvements

Expand Down
4 changes: 4 additions & 0 deletions library/Console-windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ bool Console::init(bool)
HMENU hm = GetSystemMenu(d->ConsoleWindow,false);
DeleteMenu(hm, SC_CLOSE, MF_BYCOMMAND);

// force console code pages to utf-8
SetConsoleCP(CP_UTF8);
SetConsoleOutputCP(CP_UTF8);

// set the screen buffer to be big enough to let us scroll text
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo);
d->default_attributes = coninfo.wAttributes;
Expand Down
Loading