Echo UTF-8 characters in windows batch

后端 未结 5 1789
暖寄归人
暖寄归人 2021-02-03 22:41

Can I use echo to generate an UTF-8 text file? For example if I want to generate a file that contains the character \"ę\"

echo \"abcd ę\" > out.txt

5条回答
  •  囚心锁ツ
    2021-02-03 22:47

    Try starting CMD.exe with the /U switch: it causes all pipe output to be Unicode instead of ANSI.

提交回复
热议问题