From 3991bb0906a2910ed93c1929f44bd02ab80f9e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Sun, 11 Jun 2023 07:11:41 +0200 Subject: [PATCH] Complain on windows if the active code page is not UTF-8 See 18084d5aa0e5, where we enable requesting this on startup but it may fail on older versions of windows. --- src/common/platform/Windows.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/platform/Windows.cpp b/src/common/platform/Windows.cpp index 53ca59801..983c5ba2b 100644 --- a/src/common/platform/Windows.cpp +++ b/src/common/platform/Windows.cpp @@ -407,5 +407,9 @@ void SetupCrt() { _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); } + if (GetACP() != CP_UTF8) + { + std::cerr << "failed to set codepage to utf-8, expect breakage" << std::endl; + } } }