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
Use chcp command to change active code page to 65001 for utf-8.
chcp
chcp 65001