UTF8NoBom in PowerShell

20 Views Asked by At

I need to generate a txt file in UTF8 without BOM. I started with:

"Text" | Out-File .\File.txt

which gives me UTF-16 LE encoding.

I tried

"Text" | Out-File .\File.txt -Encoding utf8

which gives me UTF-8 with BOM.

How do I get it without BOM?

0

There are 0 best solutions below