Skip to content

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
@pjfanning pjfanning deleted the surrogate-chars branch January 1, 2025 10:40
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