You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
investigate handling of windows file paths which are invalid utf-16le #1774
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.
I wonder if we just need a type "FilePath" that is distinct from []u8. That way we don't do needless conversions if you're going from e.g. a directory iterator to opening files.
Though I'm afraid FilePath might end up being a middling solution that makes things more difficult while leaving some corner cases unhandled. e.g. I think different filesystems have different limitations: some are case insensitive, windows will blow up if you use the non \??\ prefix and use filenames like NUL
However the more I think about it, a FilePath type would be a correct place for handling that sort of thing!
Activity
daurnimator commentedon Nov 24, 2018
I wonder if we just need a type "FilePath" that is distinct from
[]u8. That way we don't do needless conversions if you're going from e.g. a directory iterator to opening files.Though I'm afraid
FilePathmight end up being a middling solution that makes things more difficult while leaving some corner cases unhandled. e.g. I think different filesystems have different limitations: some are case insensitive, windows will blow up if you use the non\??\prefix and use filenames like NULHowever the more I think about it, a
FilePathtype would be a correct place for handling that sort of thing!Fix handling of Windows (WTF-16) and WASI (UTF-8) paths
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths