Fix bug: JSONObject doesn't escape Chinese characters. #47

Closed
wants to merge 2 commits into
from
View
@@ -1198,7 +1198,8 @@ public static String quote(String string) {
break;
default:
if (c < ' ' || (c >= '\u0080' && c < '\u00a0') ||
- (c >= '\u2000' && c < '\u2100')) {
+ (c >= '\u2000' && c < '\u2100') ||
+ (c >= '\u4e00' && c < '\ua000')) {
hhhh = "000" + Integer.toHexString(c);
sb.append("\\u" + hhhh.substring(hhhh.length() - 4));
} else {