Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix for a bug in unicode surrogate pair handling #58

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bogbert
Copy link

@bogbert bogbert commented Aug 26, 2016

eg: the JSON string "\ud841\udf31" should contain the character with the unicode scalar value U+20731, not U+10731

eg: the JSON string "\ud841\udf31" should contain the character with the unicode scalar value U+20731, not U+10731
@LB-- LB-- added this to the v1.2.0 milestone Aug 16, 2021
@DimitriPapadopoulos
Copy link
Contributor

@LB-- I'm wondering whether this should be added to the v1.1.1 milestone. It looks like Unicode strings are not read correctly.

@bogbert It would be great if a test could be added. File tests/valid-0012.json already contains UTF-16 surrogate pairs as far as I can understand. If the bug does not show with the existing examples, could you add one this 𠜱 example?

"CJK Unified Ideograph-20731 (U+20731)": "\ud841\udf31",

@LB-- LB-- modified the milestones: v1.2.0, v1.1.1 Nov 6, 2021
@LB--
Copy link
Member

LB-- commented Nov 6, 2021

I've added some basic string comparison tests in 174e5a7 as a good starting point for this. It seems like this change does in fact fix the issue, but I'll want to get more comparisons in the tests first to make sure nothing else gets broken.

@DimitriPapadopoulos
Copy link
Contributor

DimitriPapadopoulos commented Dec 29, 2021

See for example:

I have forked the bogbert/masterbranch into Dimitri/Papadopoulos/bogbert to rebase it and attempt to add more tests.

This was referenced Dec 29, 2021
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.

3 participants