# Fix handling of Windows \(WTF-16\) and WASI \(UTF-8\) paths · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/68b87918df9ad82cf3161f323c55f2e238319922)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 68b87918df9ad82cf3161f323c55f2e238319922

Requested commit: 68b87918df9ad82cf3161f323c55f2e238319922

Commit: 68b87918df9ad82cf3161f323c55f2e238319922

Tree: c802aea2b636236f767e6c1cdd864f01c2b47d15

Author: Ryan Liptak

Committer: Ryan Liptak

## Message

```
Fix handling of Windows (WTF-16) and WASI (UTF-8) paths

Windows paths now use WTF-16 <-> WTF-8 conversion everywhere, which is lossless. Previously, conversion of ill-formed UTF-16 paths would either fail or invoke illegal behavior.

WASI paths must be valid UTF-8, and the relevant function calls have been updated to handle the possibility of failure due to paths not being encoded/encodable as valid UTF-8.

Closes #18694
Closes #1774
Closes #2565

```

## Parents

- [f6b6b8a4ae4780f21c45824d34d8e14b3c3b5037](https://git.cafe/gitcafe/zig/commit/f6b6b8a4ae4780f21c45824d34d8e14b3c3b5037?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/68b87918df9ad82cf3161f323c55f2e238319922?format=markdown)
