mirror of
https://github.com/nlohmann/json.git
synced 2025-07-15 07:41:50 +03:00
Fix character skipping after a surrogate pair
In a string the first character following a surrogate pair is skipped by the lexer, but the rest of the string is parsed as usual.
This commit is contained in:
@ -10205,4 +10205,9 @@ TEST_CASE("regression tests")
|
||||
j["string"] = bytes;
|
||||
CHECK(j["string"] == "\u0007\u0007");
|
||||
}
|
||||
|
||||
SECTION("character following a surrogate pair is skipped")
|
||||
{
|
||||
CHECK(json::parse("\"\\ud80c\\udc60abc\"").get<json::string_t>() == u8"\U00013060abc");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user