diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-08-23 18:39:56 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-08-24 20:26:37 +0200 |
commit | dc45a07c3628b82817a96fcb7df3d211d901af5d (patch) | |
tree | 40ee7798ace8af8749b416e00ee7eb4db87e8aad /tests | |
parent | 46a628b1398ae6a58d6847223736431225c4c0cc (diff) | |
download | qemu-dc45a07c3628b82817a96fcb7df3d211d901af5d.zip qemu-dc45a07c3628b82817a96fcb7df3d211d901af5d.tar.gz qemu-dc45a07c3628b82817a96fcb7df3d211d901af5d.tar.bz2 |
json: Fix \uXXXX for surrogate pairs
The JSON parser treats each half of a surrogate pair as unpaired
surrogate. Fix it to recognize surrogate pairs.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-30-armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check-qjson.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c index 4abb584..343f8af 100644 --- a/tests/check-qjson.c +++ b/tests/check-qjson.c @@ -63,8 +63,7 @@ static void escaped_string(void) { "double byte utf-8 \\u00A2", "double byte utf-8 \xc2\xa2" }, { "triple byte utf-8 \\u20AC", "triple byte utf-8 \xe2\x82\xac" }, { "quadruple byte utf-8 \\uD834\\uDD1E", /* U+1D11E */ - /* bug: want \xF0\x9D\x84\x9E */ - NULL }, + "quadruple byte utf-8 \xF0\x9D\x84\x9E" }, { "\\", NULL }, { "\\z", NULL }, { "\\ux", NULL }, |