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

@ -1,3 +1,8 @@
2019-02-27 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSJSONSerialization.m: escape characters with codepoint
greater than 0x7f.
2019-02-15 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSMime.m: When encoding quoted words in a header, ensure

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];