Skip to content

Test run-pass\process-remove-from-env.rs fails on Windows with non-English locale #25268

Closed
@petrochenkov

Description

@petrochenkov

https://github.com/rust-lang/rust/blob/master/src/test/run-pass/process-remove-from-env.rs

---- [run-pass] run-pass/process-remove-from-env.rs stdout ----
        thread '[run-pass] run-pass/process-remove-from-env.rs' panicked at 'called `Result::unwrap()` on an `Err` value: FromUtf8Error { bytes: [ /* some bytes */ ], error: Utf8Error { valid_up_to: 251 } }', C:/msys64/home/rust/src/libcore\result.rs:729

The failure happens in Command::spawn when the output of the command cmd /c set used in the test contains cyrillic letters. Probably some pieces of process use locale-dependent encoding (Windows-1251 in this case) instead of unicode. Changing the system locale to English (USA) or replacing cmd with something like echo foo makes this error go away.

cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions