forked from 0ad/0ad
Set source and executable character sets to UTF-8 on Windows, removes a platform discrepancy, fixes #5094.
Patch By: Inari Tested By: Angen Differential Revision: https://code.wildfiregames.com/D1411 This was SVN commit r23383.
This commit is contained in:
parent
601892a2bb
commit
dbb69285a5
@ -385,6 +385,10 @@ function project_create(project_name, target_type)
|
||||
toolset "v140_xp"
|
||||
filter {}
|
||||
|
||||
filter "action:vs*"
|
||||
buildoptions "/utf-8"
|
||||
filter {}
|
||||
|
||||
project_set_target(project_name)
|
||||
project_set_build_flags()
|
||||
end
|
||||
|
@ -154,10 +154,9 @@ public:
|
||||
|
||||
roundtrip<std::wstring>(L"", "\"\"");
|
||||
roundtrip<std::wstring>(L"test", "\"test\"");
|
||||
// Windows has two byte wchar_t. We test for this explicitly since we can catch more possible issues this way.
|
||||
roundtrip<std::wstring>(L"тест", sizeof(wchar_t) == 2 ? "\"\\xD1\\u201A\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\u0435\\u0441\\u0442\"");
|
||||
roundtrip<std::wstring>(L"тест", "\"\\u0442\\u0435\\u0441\\u0442\"");
|
||||
roundtrip<std::wstring>(w1, "\"t\\x00st\"");
|
||||
roundtrip<std::wstring>(w2, sizeof(wchar_t) == 2 ? "\"\\xD1\\x00\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\x00\\u0441\\u0442\"");
|
||||
roundtrip<std::wstring>(w2, "\"\\u0442\\x00\\u0441\\u0442\"");
|
||||
|
||||
convert_to<const char*>("", "\"\"");
|
||||
convert_to<const char*>("test", "\"test\"");
|
||||
|
Loading…
Reference in New Issue
Block a user