PoshCode / Configuration

A module to help other modules have settings
MIT License
176 stars 27 forks source link

Update-Metdata should not change file encoding #17

Open lipkau opened 6 years ago

lipkau commented 6 years ago

Current behavior

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

https://github.com/PoshCode/Configuration/blob/244a7cbc6f7f415fb989acb82637d42b46447099/Source/Metadata.psm1#L595

Expected behavior

Metadata should not change the file encoding of the manifest.

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

Jaykul commented 6 years ago

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 commented 6 years ago

Suggestion