Improved decoding of UTF-16 surrogate pairs (closes #1157)

This commit is contained in:
Kay Sievers
2020-01-02 13:14:02 +01:00
committed by Benoit Blanchon
parent 8550418875
commit 91b808381e
5 changed files with 36 additions and 13 deletions

View File

@ -17,10 +17,10 @@ TEST_CASE("Valid JSON strings value") {
{"\'hello world\'", "hello world"},
{"\"1\\\"2\\\\3\\/4\\b5\\f6\\n7\\r8\\t9\"", "1\"2\\3/4\b5\f6\n7\r8\t9"},
{"'\\u0041'", "A"},
{"'\\u00e4'", "\xc3\xa4"}, // ä
{"'\\u00E4'", "\xc3\xa4"}, // ä
{"'\\u3042'", "\xe3\x81\x82"}, // あ
{"'\\u00e4'", "\xc3\xa4"}, // ä
{"'\\u00E4'", "\xc3\xa4"}, // ä
{"'\\u3042'", "\xe3\x81\x82"}, // あ
{"'\\ud83d\\udda4'", "\xf0\x9f\x96\xa4"}, // 🖤
};
const size_t testCount = sizeof(testCases) / sizeof(testCases[0]);