mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Show Unicode symbols for replaced control codes.
This commit is contained in:
parent
b0f39a8f78
commit
158bc127a3
@ -260,9 +260,9 @@ static xs_val *_xs_json_loads_lexer(const char **json, js_type *t)
|
|||||||
else
|
else
|
||||||
cp = i;
|
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))
|
if (cp >= '\0' && cp < ' ' && !strchr("\r\n\t", cp))
|
||||||
cp = 0xfffd;
|
cp += 0x2400;
|
||||||
|
|
||||||
v = xs_utf8_enc(v, cp);
|
v = xs_utf8_enc(v, cp);
|
||||||
c = '\0';
|
c = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user