Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Default/OEM encoding behavior PowerShell Core (#3467)
Based on the conclusion in discussion #3248, this PR fix "OEM" and "Default" encoding in powershell. 1. OEM -- We need an internal fix because .Net Core has no "OEM" encoding. The fix gives the following PowerShell Core behavior on "OEM" encoding: - on Windows - as Windows PowerShell based on GetOEMCP() and legacy encodings (System.Text.Encoding.CodePages) - on Unix - the same as default encoding in PowerShell Core 2. Default -- We need internal fix because CoreFX `Encoding.default` for all platforms is UTF8. Until we complete the `Encoding RFC` we should restore behavior as in Windows PowerShell. The fix gives the following PowerShell Core behavior on "Default" encoding: - on Windows - as Windows PowerShell based on GetACP() and legacy encodings (System.Text.Encoding.CodePages) - on Unix - UTF-8 without BOM (We are expecting that the same will be [in CoreFX](https://github.com/dotnet/coreclr/issues/10643))
- Loading branch information
1 parent
459b0b5
commit 0883438
Showing
5 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters