cmake: Set process code page to UTF-8 on Windows

Additionally, this change adds app manifests to targets that were
previously missing them.
This commit is contained in:
Hennadii Stepanov
2025-09-22 12:13:48 +01:00
parent dccbb17806
commit f366408492
7 changed files with 19 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
#include <util/time.h>
#ifdef WIN32
#include <cassert>
#include <codecvt>
#include <compat/compat.h>
#include <windows.h>
@@ -83,6 +84,7 @@ void SetupEnvironment()
setenv("LC_ALL", "C.UTF-8", 1);
}
#elif defined(WIN32)
assert(GetACP() == CP_UTF8);
// Set the default input/output charset is utf-8
SetConsoleCP(CP_UTF8);
SetConsoleOutputCP(CP_UTF8);