Complain on windows if the active code page is not UTF-8

See 18084d5aa0, where we enable requesting this on startup but it may fail on older versions of windows.
This commit is contained in:
Tamás Bálint Misius 2023-06-11 07:11:41 +02:00
parent ced60439ae
commit 3991bb0906
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -407,5 +407,9 @@ void SetupCrt()
{ {
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
} }
if (GetACP() != CP_UTF8)
{
std::cerr << "failed to set codepage to utf-8, expect breakage" << std::endl;
}
} }
} }