We use
chcp 932
reg query /?
inside Runtime.exec() in java 64bit eclipse with Locale set to Japanese using
Locale.setDefault()
Text file encoding in Eclipse is set to UTF-8. However, on running said query to get the long/short date time formats, the japanese characters are not displayed properly on the console. (They are printed as:)
sLongDate REG_SZ yyyy'�N'M'��'d'��'
We also do:
System.out.println(new String(cmdOutput.getBytes ("UTF-8")));
It is interesting to note that while running the above in windows cmd, the Japanese characters are displayed correctly (that is, after changing active page code to 932).
What is missing in the above character encoding approach?
[Update]: Changing eclipse IDE font type to MS UI Gothic as mentioned here[What Font to Use to Display Japanese Characters in Eclipse Console Output? displays atleast some of the characters like (Japanese yen). But still, other characters are not printed correctly (like ��)