Change default fallback encoding for GetEncoding in Start-Transcript - #13732
Conversation
The System.Management.Automation.Utils.GetEncoding method should return UTF8 without BOM as a default but was returning ASCII. This is fixed by returning an instance of the Utf8Encoding with the BOM set to false.
|
@PowerShell/powershell-committee please review this potentially breaking change, noting the linked issues |
Add the label for the boolean argument Co-authored-by: Ilya <darpa@yandex.ru>
|
For PowerShell-Committee:
|
|
ASCII being a subset of UTF8 makes this an unlikely impactful breaking change (bucket 3) for me. Seems like the right thing to do. |
|
@PowerShell/powershell-committee reviewed this, we agree that this is a bucket 3 breaking change that is unlikely to have negative impact on anyone. This should have been changed along with the other encoding changes to UTF-8 by default and is a bug fix. |
|
Dongbo Wang (@daxian-dbw) please re-review if you can |
|
Rob Holt (@rjmholt) I'm not sure about those CI fails, do I need to do something about them? |
|
I restarted CI Windows. |
|
Xavier Hahn (@Gimly) Thanks for your contribution! |
|
🎉 Handy links: |
PR Summary
The System.Management.Automation.Utils.GetEncoding method should return UTF8 without BOM as a default but was returning ASCII.
This is fixed by returning an instance of the Utf8Encoding with the BOM set to false as a default fallback encoding.
PR Context
This should fix #13678 and fix partially #13677
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.