Index: build/premake/premake5.lua =================================================================== --- build/premake/premake5.lua +++ build/premake/premake5.lua @@ -387,6 +387,10 @@ toolset "v140_xp" filter {} + filter "action:vs*" + buildoptions "/utf-8" + filter {} + project_set_target(project_name) project_set_build_flags() end Index: source/scriptinterface/tests/test_ScriptConversions.h =================================================================== --- source/scriptinterface/tests/test_ScriptConversions.h +++ source/scriptinterface/tests/test_ScriptConversions.h @@ -154,10 +154,9 @@ 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\"");