-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(core): Ensure manipulating config with UTF8 encoding #4644
fix(core): Ensure manipulating config with UTF8 encoding #4644
Conversation
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.
Maybe New-Item
is another choice.
I found in its docs that: (-ItemType File
)
When you create a file using this method, the resulting file is encoded as UTF-8 without a byte-order-mark (BOM).
Fixes ScoopInstaller#4629 Signed-off-by: Chawye Hsu <chawyehsu@hotmail.com>
3f6f60f
to
ff9d0ca
Compare
I've updated the implementation by referring the simpler Puppet.Dsc's implementation and updated the tests. The tests failed under WindowsPowerShell on CI, which can't be reproduced on my local environment. @niheaven Need your help. You may look at and review the new commits and see if it can be bundled into the upcoming release. |
I'll check it tomorrow. |
@chawyehsu It is a bug of Pester/PS5 when test file contains non-ASCII characters. Using Although change |
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.
LGTM
This was introduced in #4644 and only occurred in non-Unicode system
Description
Use utf8 encoding in scoop's and aria2's config
Motivation and Context
Fixes #4629
How Has This Been Tested?
New unit tests introduced.
Checklist: