diff options
author | default <nobody@localhost> | 2023-03-08 03:55:10 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-03-08 03:55:10 +0100 |
commit | 158bc127a35ef48e8a3c1dc510aababb8abdb676 (patch) | |
tree | ede71418b29dddd46be2559d12948026a8b2926e /xs_json.h | |
parent | b0f39a8f78e21773e9083b0ea7cf480698016cda (diff) |
Show Unicode symbols for replaced control codes.
Diffstat (limited to 'xs_json.h')
-rw-r--r-- | xs_json.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -260,9 +260,9 @@ static xs_val *_xs_json_loads_lexer(const char **json, js_type *t) else cp = i; - /* replace dangerous control codes with the replacement char */ + /* replace dangerous control codes with their visual representations */ if (cp >= '\0' && cp < ' ' && !strchr("\r\n\t", cp)) - cp = 0xfffd; + cp += 0x2400; v = xs_utf8_enc(v, cp); c = '\0'; |