Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from
Closed

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

wants to merge 2 commits into from

Conversation

qzchenwl
Copy link

Chinese characters' Unicode range in [4e00,9fff].

@qzchenwl qzchenwl closed this Mar 13, 2012
@qzchenwl qzchenwl reopened this Mar 13, 2012
@qzchenwl qzchenwl closed this Mar 13, 2012
@douglascrockford
Copy link
Contributor

Why should Chinese characters be escaped?

@qzchenwl
Copy link
Author

In section 3 of RFC4627.

JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.

Java source file usually encoded in GBK or UTF-8. If a web page encoded in UTF-8 requests a JSON text encode GBK, Chinese characters cannot be parsed, vice versa. The Unicode representation can be parsed for all.

@qzchenwl qzchenwl reopened this Mar 14, 2012
@douglascrockford
Copy link
Contributor

That makes no sense.

BGehrels pushed a commit to BGehrels/JSON-java that referenced this pull request Apr 29, 2020
…resource

add JSONPointerTest to test suite, fix resource for gradle build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants