Open
Description
When processing build scripts for directives, Cargo requires the line to be valid UTF-8. This poses a problem on Windows, where filenames are not all valid UTF-8 and may contain unpaired surrogates.
I do not have any good ideas for handling this. Putting WTF-8 on the wire is the only thing that seems close to workable, but it's explicitly not supposed to be used for that purpose, and there are no APIs that can be used (Rust very intentionally does not expose the wtf8
encoding).