Powershell: Setting Encoding for Get-Content Pipeline

后端 未结 4 1659
说谎
说谎 2020-12-14 06:07

I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code:

cat tmp.log -encoding UTF8 > new.log
4条回答
  •  情话喂你
    2020-12-14 06:51

    load content from xml file with encoding.

    (Get-Content -Encoding UTF8 $fileName)

提交回复
热议问题