Skip to content

Parsers should support unvalidated UTF16 and Latin-1 #275

Open
@Manishearth

Description

@Manishearth

Currnetly the parsers, like Instant::from_str() requires validated UTF8 str.

JS engines typically have UTF16 or unvalidated UTF8.

It would be nice if these parsers were written to consume &[u8] (most of the parsing is ASCII only anyway), so we could at least operate on unvalidated UTF8 and have from_utf8_bytes() functions.

Ideally we also have UTF16 functions. That would need a tweak to the ixdtf parser.


Update: This should also handle Latin-1. Our parse functions mostly just care about ASCII anyway so it's not a big deal, but it is somewhat better from a cleanliness pov to accept it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions