We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 514f7ba commit 7a61905Copy full SHA for 7a61905
src/doomgeneric_ascii.c
@@ -264,8 +264,14 @@ void DG_Init(void)
264
if (i > 0)
265
keypress_smoothing_ms = atoi(myargv[i + 1]);
266
267
- if (character_set != ASCII && !setlocale(LC_ALL, "en_US.UTF-8"))
268
- I_Error("DG_Init: setlocale error");
+ if (character_set != ASCII) {
+#ifdef OS_WINDOWS
269
+ WINDOWS_CALL(!SetConsoleOutputCP(CP_UTF8), "DG_Init: %s");
270
+#else
271
+ if (!setlocale(LC_ALL, "en_US.UTF-8"))
272
+ I_Error("DG_Init: setlocale error");
273
+#endif
274
+ }
275
276
/* Longest per-pixel SGR code: \033[38;2;RRR;GGG;BBBm (length 19)
277
* 2 Chars per pixel
0 commit comments