escape charaacters with codepoint greater than 0x7f

This commit is contained in:
Richard Frith-Macdonald 2019-02-27 16:54:45 +00:00
parent 06019034b0
commit dd3e71e050
2 changed files with 7 additions and 2 deletions

View file

@ -878,7 +878,7 @@ writeObject(id obj, NSMutableString *output, NSInteger tabs)
{
size += 2;
}
else if (c < 0x20)
else if (c < 0x20 || c > 0x7f)
{
size += 6;
}
@ -909,7 +909,7 @@ writeObject(id obj, NSMutableString *output, NSInteger tabs)
default: to[j++] = '"'; break;
}
}
else if (c < 0x20)
else if (c < 0x20 || c > 0x7f)
{
char buf[5];