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

Filter to valid surrogate pairs #56

Merged
merged 2 commits into from
Apr 29, 2021
Merged

Filter to valid surrogate pairs #56

merged 2 commits into from
Apr 29, 2021

Conversation

guybedford
Copy link
Collaborator

This adds filtering to ensure that string encodings always correspond to valid surrogate pairs so that only valid UTF-8 codepoints are represented.

lexer.js Outdated Show resolved Hide resolved
Copy link
Contributor

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Is having single-file scripts a design goal? Otherwise you could put the decode function in a separate file to avoid duplicating it.

@guybedford
Copy link
Collaborator Author

Is having single-file scripts a design goal? Otherwise you could put the decode function in a separate file to avoid duplicating it.

The JS lexer.js doesn't have a build so it's likely simpler for now.

@guybedford guybedford merged commit b4945d8 into master Apr 29, 2021
@guybedford guybedford deleted the surrogate-filtering branch April 29, 2021 10:49
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.

None yet

2 participants