Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1049

Using PowerShell to write a file in UTF-8 without the BOM

$
0
0

Out-File seems to force the BOM when using UTF-8:

$MyFile = Get-Content $MyPath$MyFile | Out-File -Encoding "UTF8" $MyPath

How can I write a file in UTF-8 with no BOM using PowerShell?

Update 2021

PowerShell has changed a bit since I wrote this question 10 years ago. Check multiple answers below, they have a lot of good information!


Viewing all articles
Browse latest Browse all 1049

Trending Articles



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