Skip to content

Add an option to throw an exception from Source.readString decoding errors #326

@fzhinkin

Description

@fzhinkin

Currently, Source.readString can only emit a replacement character when ill-formed UTF-8 code units are encountered during decoding.

A similar stdlib function, ByteArray.decodeToString, however, can throw an exception in such cases if a user specifies the corresponding option (throwOnInvalidSequence).

We should consider providing an API consistent with stdlib.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions