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

View File

@ -1049,7 +1049,7 @@ public class Utilities {
b.append("\\\\"); b.append("\\\\");
else if (c == ' ') else if (c == ' ')
b.append(" "); 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)); b.append("\\u"+Utilities.padLeft(Integer.toHexString(c), '0', 4));
} else if (((int) c) < 32) } else if (((int) c) < 32)
b.append("\\u" + Utilities.padLeft(Integer.toHexString(c), '0', 4)); b.append("\\u" + Utilities.padLeft(Integer.toHexString(c), '0', 4));