Unicode problem after regenerating
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 33
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
A json string eg.
{"test": "\u4f60\u597d"}
parse it jsonObj = JSON.parse(s), then generate it newStr = JSON.generate(jsonObj)
the content of "newStr" is now
{"test": "你好"}
which is supposed to be identical with the original string( {"test": "\u4f60\u597d"} ).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the JSON.parse and JSON.generate sequence shown in the issue, using the escaped Chinese string as input. Trace the parser and generator entry points in mruby-json to find where the representation changes; done means regeneration preserves the original \u4f60\u597d escaping rather than emitting literal characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ruby
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100