Skip to content

getopts panics parsing non-UTF-8 arguments #28

Closed
@remram44

Description

@remram44

Arguments are OsString objects. While parse() takes an IntoIterator<Item=AsRef<OsStr>> (which can safely accept env::args_os()), the Matches structure only gives out String objects, which can only be built for UTF-8.

I don't know if this can possibly be fixed without breaking anything, but new safe methods on Matches could certainly be introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions