encoding problem of Console
I use the j2se 1.4.2_05-b04, and met a problem.
the code is as follow, I have encoded the source code with UTF-8
OutputStreamWriter ow = new OutputStreamWriter(System.out,"UTF-8");
System.out.println(ow.getEncoding());
ow.write(" ?);
ow.flush();
ow.close();
I got the result:
UTF8
莽鈥� 鈥� 鈥�
鈥� 鈥�
--
then I changed it with
OutputStreamWriter ow = new OutputStreamWriter(System.out);
...
the result:
GBK
?
-
the encoding of ISO-8859-1 was even worse:
ISO8859_1
�? ? ? ? ?
-
It made no difference even after add System.setProperty("file.encoding",
"UTF-8");
How can I get the Latin letter printed proper on console

