Encoding for New-ModuleManifest on all platforms should be UTF-8 NoBOM#5923
Merged
adityapatwardhan merged 3 commits intoPowerShell:masterfrom Jan 18, 2018
Merged
Conversation
8 tasks
adityapatwardhan
requested changes
Jan 17, 2018
| this, | ||
| filePath, | ||
| #if UNIX | ||
| new UTF8Encoding(false), // UTF-8, no BOM |
Member
There was a problem hiding this comment.
Would prefer using named parameter instead of a comment about no BOM.
| { | ||
| $ExpectedManifestBytes = @(35,10) | ||
| } | ||
| $ExpectedManifestBytes = @(35,10) |
Member
There was a problem hiding this comment.
In BeforeEach, New-Item should pipe to $null. GitHub won't let me comment on that line since it is not near the change.
adityapatwardhan
requested changes
Jan 17, 2018
| false | ||
| cmdlet : this, | ||
| filePath : filePath, | ||
| resolvedEncoding : new UTF8Encoding(false), // UTF-8, no BOM |
Member
There was a problem hiding this comment.
should be new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)
Member
Author
There was a problem hiding this comment.
will update, missed that one
adityapatwardhan
approved these changes
Jan 17, 2018
8 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
When we decided not to take #4119 it meant that the file encoding for
New-ModuleManifeston Windows stayed as UTF-16 w/ BOM.We had decided to adopt UTF-8 NoBOM as standard in PSCore6.
The fix is to remove Windows specific logic in the code and in the test for UTF-16 w/ BOM.
PR Checklist
Note: Please mark anything not applicable to this PR
NA.[feature]if the change is significant or affects feature testsWIP:to the beginning of the title and remove the prefix when the PR is ready.