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 issue with incorrect matches for some surrogate chars #1360

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

pjfanning
Copy link
Member

see #1359

private boolean _isSurrogateChar(int ch) {
return (ch & 0xD800) == 0xD800;
private static boolean _isStartOfSurrogatePair(final int ch) {
return (ch & 0xF800) == 0xD800;
Copy link
Member Author

@pjfanning pjfanning Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change based on comments in #1359 but would like to have it reviewed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated my comment: I think mask actually needs to be 0xFC00 for First surrogate (i.e. not match Second part of surrogate pair). Will change.

@cowtowncoder cowtowncoder merged commit 88b4c94 into FasterXML:2.18 Nov 15, 2024
7 checks passed
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