summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-05-15 20:33:21 +0300
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-06-19 14:42:09 +0300
commit33f55369cbc0599ff304b3e3f8617c6cf90c50af (patch)
treef5c49fd64db307ea30ffa7d504c04394f3a0d382 /SConstruct
parent7fa941bfd8a1d81fc5c27c21635e60846efc52f4 (diff)
Enforce Unicode encoding in MSVC
This can help to solve compilation issues on systems with Japanese locale with encodings like Shift_JIS and UTF-8-BOM. Also be more consistent using String::utf8() to represent cyrilic unicode characters in test_string.cpp Clarified some comments in test_string.cpp for some Unicode characters.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct2
1 files changed, 2 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index ce2566559c..7358494123 100644
--- a/SConstruct
+++ b/SConstruct
@@ -327,6 +327,8 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['/EHsc'])
if (env["werror"]):
env.Append(CCFLAGS=['/WX'])
+ # Force to use Unicode encoding
+ env.Append(MSVC_FLAGS=['/utf8'])
else: # Rest of the world
shadow_local_warning = []
all_plus_warnings = ['-Wwrite-strings']