summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-07-16 18:12:17 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-07-16 23:01:08 +0200
commit16abdd52546eb3cfa9d51d674c41711c2c170029 (patch)
tree340864cb07e66b8fd075b45779afc1add5c2b4b4 /src/os
parentafea5e85aeff20077161cc37500755e9ee9a6b14 (diff)
downloadopenttd-16abdd52546eb3cfa9d51d674c41711c2c170029.tar.xz
Change: [Win32] Set the console codepage to UTF-8
Diffstat (limited to 'src/os')
-rw-r--r--src/os/windows/win32.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index 938aee5f9..6b612ac40 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -393,6 +393,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
* be available between subsequent calls to FS2OTTD(). */
char *cmdline = stredup(FS2OTTD(GetCommandLine()).c_str());
+ /* Set the console codepage to UTF-8. */
+ SetConsoleOutputCP(CP_UTF8);
+
#if defined(_DEBUG)
CreateConsole();
#endif