don't escape unicode whitespace in json files

This commit is contained in:
Grahame Grieve 2024-08-16 06:47:25 +08:00
parent c9bb2b4e55
commit 2b54f1cf1a
1 changed files with 1 additions and 1 deletions

View File

@ -1049,7 +1049,7 @@ public class Utilities {
b.append("\\\\");
else if (c == ' ')
b.append(" ");
else if (isWhitespace(c)) {
else if (c == '\r' || c == '\n') { // was isWhitespace(c), but this escapes unicode characters, and seems unnecessary
b.append("\\u"+Utilities.padLeft(Integer.toHexString(c), '0', 4));
} else if (((int) c) < 32)
b.append("\\u" + Utilities.padLeft(Integer.toHexString(c), '0', 4));