mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
json: convert utf16 to utf8
We work with utf8 string so convert the unicode escape sequences to utf8. Fixes #2337
This commit is contained in:
parent
f2cdb15e0c
commit
5137015c33
2 changed files with 24 additions and 7 deletions
|
|
@ -178,7 +178,7 @@ PWTEST(json_encode)
|
|||
pwtest_str_eq(result, "\x04\x05\x1f\x20\x01\x7f\x90");
|
||||
strcpy(dst, "\"\\u03b2a\"");
|
||||
pwtest_int_eq(spa_json_parse_stringn(dst, sizeof(dst), result, sizeof(result)), 1);
|
||||
pwtest_str_eq(result, "\003\262a");
|
||||
pwtest_str_eq(result, "\316\262a");
|
||||
|
||||
return PWTEST_PASS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue