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
The problem was that the file contained the line:
and then Notepad2 and Firefox was changing the charset, showing Ä instead of ę. In plain Notepad, the file looks ok. The solution was to add the UTF-8 signature (Byte Order Mark) at the beginning of the file:
echo1 -ne \xEF\xBB\xBF > out.htm
(echo1 is from gnuwin32)
thanks for the answers