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.
This commit is contained in:
@ -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']
|
||||
|
||||
Reference in New Issue
Block a user