Closed zetanumbers closed 1 year ago
Have you tested this on Windows, macOS, and Linux? I'm curious if this can break if RUSTFLAGS
somehow grabs UTF16 paths on Windows.
Have you tested this on Windows, macOS, and Linux? I'm curious if this can break if
RUSTFLAGS
somehow grabs UTF16 paths on Windows.
Rust std assumes windows strings are wtf-8, which is basically utf-8 pretending to be utf-16. Since wtf-8 is a superset of utf-8, you can interact with it via any tool with wtf-8 (terminal, shell), which i imagine is majority. Rust std only checks if wtf-8 contains any surrogate code point (pair) and if not, it trivially converts OsString to String. Cargo should use wtf-8 too, so this pr should have the right approach.
I've tested passing Cyrillic on windows via nushell, and it woked as intended.
I am touched by your assumption that i am a CI in the flesh, but i do not have a spare macos system 😉. But since macos is unix, it's the same as for linux (OsStrExt is implemented for unix family).
Speaking of which, I could set up macOS and windows VMs on my server if concourse supports adding those as runners.
Given that we're going to set up Windows/macOS workers at a later date, I'll merge this.
Thanks for the PR!
Fixes #135
It's practically impossible to have nonunicode rustflags passed into a buildscript