Allow pars escaped surrogate pairs
See original GitHub issueSurrogate pairs are parsed as two 16bit chars instead of one 32bit char.
For example this Json contains two 32bit emojis:
[ { "id" : "1", "message" : "\uD83D\uDE0B\uD83C\uDF70" } ]
We’r using java faster xml lib on one side https://github.com/FasterXML/jackson-core/issues/223 and nodejs jsonparse on the other side.
There is a diff with fix: diff.txt
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
I need help understanding how to handle JSON \u escapes ...
It mentions surrogate pairs but it doesn't say how to handle the situation I described. Adding. I'm not sure but it could be...
Read more >[Python-Dev] Cleaning up surrogate escaped strings (was ...
From a maintenance POV that does not sound like a good approach. > non-use of surrogate pairs as an intermediate encoding step. It...
Read more >Issue 3297: Python interpreter uses Unicode surrogate pairs ...
I've traced down the biggest problem to decode_unicode in ast.c. It needs to convert everything into a form of escapes so it becomes...
Read more >What every JavaScript developer should know about Unicode
Unicode in JavaScript: basic concepts, escape sequences, normalization, surrogate pairs, combining marks and how to avoid pitfalls.
Read more >String and character literals (C++) - Microsoft Learn
Universal character names and escape characters allow you to ... For Unicode surrogate pairs, specify the universal character name by using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s live! Published to github and npm
@creationix Thanks for merge https://github.com/creationix/jsonparse/pull/33. When we can expect the new version?