-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Set the output encoding to [Console]::OutputEncoding for native commands #10824
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
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
|
@PoshChan please retry windows |
|
@SteveL-MSFT, successfully started retry of |
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1
Outdated
Show resolved
Hide resolved
a2dd585 to
3b9ccb7
Compare
|
Interesting, should we do the same for [Console]::InputEncoding too? |
|
@iSazonov discussed that with @JamesWTruher, it seems that the code later overwrites it with the unfortunately named |
|
is it not able to type without problems this dialog interrupts the normal text input: |
|
🎉 Handy links: |
PR Summary
This is a regression from Windows PowerShell due to a breaking change in .NET Core. If you don't explicitly set
StandardOutputEncoding, on .NET Core it defaults to the current code page. Previously, it defaulted toConsole.OutputEncoding. Fix is to restore Windows PowerShell behavior by explicitly settingStandardOutputEncodingandStandardErrorEncodingto useConsole.OutputEncoding.PR Context
Fix #10789
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.