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

isAscii is wrong for malformed surrogates #6357

Open
swankjesse opened this issue Oct 31, 2020 · 0 comments
Open

isAscii is wrong for malformed surrogates #6357

swankjesse opened this issue Oct 31, 2020 · 0 comments
Labels
bug Bug in existing code

Comments

@swankjesse
Copy link
Collaborator

I just realized we map invalid UTF-16 chars to ?, so my length trick is incorrect. Fix is to iterate.

https://github.com/square/okio/blob/master/okio/src/commonMain/kotlin/okio/Utf8.kt#L102

@swankjesse swankjesse added the bug Bug in existing code label Oct 31, 2020
@swankjesse swankjesse added this to the 4.10 milestone Oct 31, 2020
@swankjesse swankjesse removed this from the 4.10 milestone Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in existing code
Projects
None yet
Development

No branches or pull requests

1 participant