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

JMESPath.Net does not handle Unicode surrogate pair characters correctly. #74

Closed
springcomp opened this issue Oct 15, 2022 · 0 comments · Fixed by #75
Closed

JMESPath.Net does not handle Unicode surrogate pair characters correctly. #74

springcomp opened this issue Oct 15, 2022 · 0 comments · Fixed by #75

Comments

@springcomp
Copy link
Collaborator

As reported here, JMESPath.Net does not handle Unicode surrogate pairs.

Consider this character: 😀 (0x1F600).

The following string "😀" is represented in JSON as a pair of encoded surrogate characters like "\uD83D\uDE00".

Internally, JMESPath.Net uses C# which encodes strings using UTF16-LE.
However, .NET strings do not handle surrogate pairs correctly.

Please, consider using the StringInfo class for proper support of Unicode in JMESPath.Net.

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 a pull request may close this issue.

1 participant