Considering UTF-8 + Windows CMD nightmare...
After reading this question, are these solutions only partial ? Is there a way to set globally the character set/encoding in a cmd environment? It seems that CHCP command does not change the stdout/stderr encodings.
To check it: write a program that fills a file with latin/korean/ukrainian strings.
On direct output, the file will be ok if you set the encoding properly into your source code (i checked it with Java, easy encoding settings for files).
But if you redirect your output into a log file, you will simply have series of ???????????????????? in it ...
The indirection could be useful too, like this:
PROMPT> myprog < inputdata.txt > outputdata.txt
Am i missing something? Is it cmd that badly converts stdout, or Java that adapts System.out, depending of the cmd encoding? I have not found any method to re-define System.out/err encoding.