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
Try starting CMD.exe with the /U switch: it causes all pipe output to be Unicode instead of ANSI.