Skip to content

Cargo skips build script directives containing filenames unrepresentable in UTF-8 #6537

Open
@alercah

Description

@alercah

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-scriptsArea: build.rs scriptsC-bugCategory: bugS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions