Skip to content

isAscii is wrong for malformed surrogates #6357

@swankjesse

Description

@swankjesse

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in existing code

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions