What do you mean by "Unicode escaped format"?
Normal characters won't be escaped, even a character like é also doesn't need to be escaped.
If you use some special characters like \0, then it will be escaped to \u0000
if you save text use text mode on the device: if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) and if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) everything else comes for free
I thought the whole point of his question is precisely that he wants to produce text files which are not native to the OS, specifically he wants Windows \r\n regardless of whether his app is running under Win or Linux. That was why I was saying don't use endl etc., and of course you mustn't use QIODevice::Text. Maybe I misunderstood... :)
Concerning the shell:
I use BusyBox (its light) which doesn't provide locale and the environment variables like LANG=en_US.UTF-8.
For compiling BusyBox configurations can or have to be given containing
the number is the last displayable number of the Unicode list, 0 signifies that all characters shall be displayed, it was set to 767 which includes west European characters. The excluded characters are replaced by the character defined in the same configs, in my case it is "?".