Dup Ver Goto 📝

WritingToUTF8

PT2/lang/powershell does not exist
To
9 lines, 62 words, 413 chars Page 'WritingToUTF8' does not exist.

If you just Out-File or > filename in the Powershell that ships with Windows (not the most recent cross-platform powershell), then

Get-ChildItem * | Out-File filename.txt

outputs UTF16 with a BOM at the start. If you want plain old ASCII or UTF8, use -encoding

Get-ChildItem * | Out-File -encoding ASCII filename.txt
Get-ChildItem * | Out-File -encoding UTF8 filename.txt