From d1aeba771a79953a0b004fba271c558234adfd83 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:10:46 +0300 Subject: [PATCH] [MSVC] Force UTF-8 encoding. --- CMakeLists.txt | 2 +- tools/windows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f955f79..0ee99aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ set(GODOT_COMPILE_FLAGS ) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # using Visual Studio C++ - set(GODOT_COMPILE_FLAGS "/EHsc") # /GF /MP + set(GODOT_COMPILE_FLAGS "/EHsc /utf-8") # /GF /MP if(CMAKE_BUILD_TYPE MATCHES Debug) set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} /MDd") # /Od /RTC1 /Zi diff --git a/tools/windows.py b/tools/windows.py index e64695a..b8690c5 100644 --- a/tools/windows.py +++ b/tools/windows.py @@ -30,7 +30,7 @@ def generate(env): env.Tool("mslink") env.Append(CPPDEFINES=["TYPED_METHOD_BIND", "NOMINMAX"]) - env.Append(CCFLAGS=["/EHsc"]) + env.Append(CCFLAGS=["/EHsc", "/utf-8"]) env.Append(LINKFLAGS=["/WX"]) if env["use_clang_cl"]: