|
|
|
|
|
by elchief
3666 days ago
|
|
Powershell is garbage. .Net does utf8 by default but powershell, built on .Net, manages not to. Try type utf8Encoded.txt > out.txt in cmd.exe and posh. Cmd works and posh fs it up. And after you do figure out utf8 encoding in posh, it'll always add a BOM just to screw you |
|
[IO.File]::WriteAllLines($filename, $content)
(from https://stackoverflow.com/questions/5596982/using-powershell...)