mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 01:32:48 +00:00
Convert CConsole to take UTF-8 strings.
This avoids vswprintf failures when printing non-ASCII char* strings from CLogger into the console. Also convert ScriptInterface::ToString to return UTF-8, to avoid some utf8_from_wstring calls. Also remove some unused and redundant CConsole functions. This was SVN commit r16333.
This commit is contained in:
@@ -252,6 +252,6 @@ public:
|
||||
TS_ASSERT_STR_EQUALS(stringified, "{\n \"x\": 1,\n \"z\": [\n 2,\n \"3\xE2\x98\xBA\xEF\xBF\xBD\"\n ],\n \"y\": true\n}");
|
||||
|
||||
TS_ASSERT(script.ParseJSON(stringified, &val));
|
||||
TS_ASSERT_WSTR_EQUALS(script.ToString(&val), L"({x:1, z:[2, \"3\\u263A\\uFFFD\"], y:true})");
|
||||
TS_ASSERT_STR_EQUALS(script.ToString(&val), "({x:1, z:[2, \"3\\u263A\\uFFFD\"], y:true})");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user