Skip to content
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

Update-Metdata should not change file encoding #17

Open
lipkau opened this issue May 1, 2018 · 2 comments
Open

Update-Metdata should not change file encoding #17

lipkau opened this issue May 1, 2018 · 2 comments

Comments

@lipkau
Copy link
Contributor

lipkau commented May 1, 2018

Current behavior

Metadata is hardcoded to use -Encoding UTF8.
UTF8 is UTF-8 with BOM.

Set-Content -Encoding UTF8 -Path $Path -Value $ManifestContent -NoNewline

Expected behavior

Metadata should not change the file encoding of the manifest.

Eg: I have my manifest files in UTF-8 without BOM

@Jaykul Jaykul changed the title File encoding of manfiest Update-Metdata should not change file encoding May 1, 2018
@Jaykul
Copy link
Member

Jaykul commented May 1, 2018

Not sure I agree, in principle. I rather think the Metadata module should force UTF8 without BOM (but that wasn't an option on Set-Content at the time, so I settled for UTF8).

Having said that -- for this one command, I agree that it shouldn't mess with the encoding if it's possible to avoid doing so.

@lipkau
Copy link
Contributor Author

lipkau commented May 1, 2018

Suggestion

  • use a logic like this to determine if the manifest had BOM before
  • use a logic like this to be able to write without BOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants