-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Change default fallback encoding for GetEncoding in Start-Transcript #13732
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
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. |
|
@daxian-dbw please re-review if you can |
|
@rjmholt I'm not sure about those CI fails, do I need to do something about them? |
|
I restarted CI Windows. |
|
@Gimly Thanks for your contribution! |
|
🎉 Handy links: |
Steg17
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
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.