diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 5a7adf5c82..72ca304bb2 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -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 diff --git a/source/scriptinterface/tests/test_ScriptConversions.h b/source/scriptinterface/tests/test_ScriptConversions.h index 45e2e3d797..346357cb07 100644 --- a/source/scriptinterface/tests/test_ScriptConversions.h +++ b/source/scriptinterface/tests/test_ScriptConversions.h @@ -154,10 +154,9 @@ public: roundtrip(L"", "\"\""); roundtrip(L"test", "\"test\""); - // Windows has two byte wchar_t. We test for this explicitly since we can catch more possible issues this way. - roundtrip(L"тест", sizeof(wchar_t) == 2 ? "\"\\xD1\\u201A\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\u0435\\u0441\\u0442\""); + roundtrip(L"тест", "\"\\u0442\\u0435\\u0441\\u0442\""); roundtrip(w1, "\"t\\x00st\""); - roundtrip(w2, sizeof(wchar_t) == 2 ? "\"\\xD1\\x00\\xD0\\xB5\\xD1\\x81\\xD1\\u201A\"" : "\"\\u0442\\x00\\u0441\\u0442\""); + roundtrip(w2, "\"\\u0442\\x00\\u0441\\u0442\""); convert_to("", "\"\""); convert_to("test", "\"test\"");