Repository: rust
Issue: `tests/ui/unpretty/staged-api-invalid-path-108697.rs` may fail on non English Windows installs
Labels: A-testsuite,O-windows,T-compiler,C-bug

Ran this command on Windows 11:
```sh
./x.py t --target x86_64-pc-windows-gnullvm --host x86_64-pc-windows-gnullvm tests/ui/unpretty/staged-api-invalid-path-108697.rs
```
This exact invocation requires prebuilt host gnullvm toolchain, but I suppose other Windows targets are also affected, although I cannot test them.

Expected test to pass, instead it failed with:
```
running 1 tests

[ui] tests\ui\unpretty\staged-api-invalid-path-108697.rs ... F


failures:

---- [ui] tests\ui\unpretty\staged-api-invalid-path-108697.rs stdout ----
$DIR\lol
$DIR\staged-api-invalid-path-108697.rs
diff of stderr:

-       error: couldn't read $DIR/lol: No such file or directory (os error 2)
+       error: couldn't read $DIR/lol: Nie można odnaleźć określonego pliku. (os error 2)
2         --> $DIR/staged-api-invalid-path-108697.rs:8:1
3          |
4       LL | mod foo;


The actual stderr differed from the expected stderr.
Actual stderr saved to H:\projects\rust\build\x86_64-pc-windows-gnullvm\test\ui\unpretty\staged-api-invalid-path-108697\staged-api-invalid-path-108697.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args unpretty\staged-api-invalid-path-108697.rs`

error: 1 errors occurred comparing output.
status: exit code: 1
command: PATH="H:\projects\rust\build\x86_64-pc-windows-gnullvm\stage1\bin;H:\projects\rust\build\x86_64-pc-windows-gnullvm\stage0-bootstrap-tools\x86_64-pc-windows-gnullvm\release\deps;H:\rust\bin;C:\Users\mateusz\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\mateusz\bin;C:\Program Files\Alacritty;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files\NVIDIA Corporation\Nsight Compute 2023.1.1;C:\Program Files\WezTerm;C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Process Lasso;C:\Users\mateusz\.cargo\bin;C:\Users\mateusz\AppData\Local\Microsoft\WindowsApps;C:\Users\mateusz\AppData\Local\JetBrains\Toolbox\scripts;C:\Users\mateusz\AppData\Local\GitHubDesktop\bin;C:\Users\mateusz\AppData\Local\Programs\Microsoft VS Code\bin;H:\msys64\clang64\bin;C:\Users\mateusz\AppData\Local\Microsoft\WinGet\Links;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl" "H:\\projects\\rust\\build\\x86_64-pc-windows-gnullvm\\stage1\\bin\\rustc.exe" "H:\\projects\\rust\\tests\\ui\\unpretty\\staged-api-invalid-path-108697.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\mateusz\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=H:\\projects\\rust\\vendor" "--sysroot" "H:\\projects\\rust\\build\\x86_64-pc-windows-gnullvm\\stage1" "--target=x86_64-pc-windows-gnullvm" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "H:\\projects\\rust\\build\\x86_64-pc-windows-gnullvm\\test\\ui\\unpretty\\staged-api-invalid-path-108697" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=H:\\projects\\rust\\build\\x86_64-pc-windows-gnullvm\\native\\rust-test-helpers" "-L" "H:\\projects\\rust\\build\\x86_64-pc-windows-gnullvm\\test\\ui\\unpretty\\staged-api-invalid-path-108697\\auxiliary" "-Zunpretty=mir"
stdout: none
--- stderr -------------------------------
error: couldn't read H:\projects\rust\tests\ui\unpretty\lol: Nie można odnaleźć określonego pliku. (os error 2)
  --> H:\projects\rust\tests\ui\unpretty\staged-api-invalid-path-108697.rs:8:1
   |
LL | mod foo;
   | ^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------



failures:
    [ui] tests\ui\unpretty\staged-api-invalid-path-108697.rs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 17699 filtered out; finished in 36.93ms

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-gnullvm target=x86_64-pc-windows-gnullvm
Build completed unsuccessfully in 0:00:08
```

The error `Nie można odnaleźć określonego pliku.` resembles expected English `The system cannot find the file specified.` (the test would normalize that to `No such file or directory`), but it's displayed with the OS language (Polish).