Skip to content

investigate handling of windows file paths which are invalid utf-16le #1774

@andrewrk

Description

@andrewrk

Thanks to @daurnimator for pointing this out on #1773
According to https://simonsapin.github.io/wtf-8/, Windows file paths are not necessarily valid utf-16le. When using Windows APIs the zig standard library should not panic or return an encoding error when encountering such file paths.

Zig's cross platform file system abstractions must handle this, plus unix file paths which are null terminated byte arrays.

Potentially we could decode into WTF-8 rather than UTF-8 on Windows, however then it may become subtle to know what kind of operations are allowed on file paths. For example, the algorithm for concatenation is different for each encoding.

Related: #534

Metadata

Metadata

Assignees

No one assigned

    Labels

    os-windowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions