Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell: force set-content to write UTF-8 with BOM?

$
0
0

Hi!

I'm trying to get powershell to use UTF-8 with a BOM.

Normally, when I create a new file, set-contents -encoding UTF8 works fine. However, when the file already exists and has no BOM, no BOM gets written.

Can I make powershell emit the BOM no matter what?

 

Lots of Greetings!


Volker

Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>