Configuration
Configuration copied to clipboard
Update-Metdata should not change file encoding
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
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.