-
Notifications
You must be signed in to change notification settings - Fork 13.3k
test suite: Output UTF-8 from cmd.exe on Windows #25654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Oh interesting! If this setting is applied, what happens when the program does indeed print non-utf8 contents? Does it die with an error or does Windows auto-translate it? |
I'm somewhat confused how |
There is a console, that exact console where you type
I've added a test for this issue which will fail if the proposed tweak is incorrect and the testing machine have English (US) system locale. |
We override the standard console handles, however, when spawning a child process. Are you sure that this test fails on Windows before this change?
I'm somewhat wary about changing the global state of the Windows console here (e.g. if you ctrl-c then the old state is lost), so I'd personally be more in favor of just not assuming the output is UTF-8 and pass along |
Yes.
It doesn't help other failing tests like Ideally I'd moved the fix from libtest to compiletest to localize it, but some tests are run through librustdoc and not compiletest. |
Or |
Oh wait, tests can run in parallel. That's bad :D |
Whoa there are multiple tests failing if the code page for cmd.exe is not UTF-8? In that case this does sound like a "let's provide a warning when |
I guess setting the code page of the console affects what encoding certain processes use when writing to a piped stdout/stderr even though a pipe isn't a console. |
So, I removed all the changes and left only a warning. |
⌛ Testing commit 8c86f8f with merge affcc24... |
💔 Test failed - auto-mac-64-opt |
It seems your |
Yeah, one forgotten comma and one platform turns into seven :) |
⌛ Testing commit a40bca2 with merge 2bc526a... |
💔 Test failed - auto-linux-32-nopt-t |
The failure seems completely unrelated. |
@bors: retry |
Fixes #25268 and a couple of similar test errors r? @alexcrichton
Fixes #25268 and a couple of similar test errors
r? @alexcrichton