Submitted On 04-FEB-1998
McKennaP
I talked to a colleague about this problem. We are trying to use a Java
properties file to retrieve
our messages. We display our messages on System.out and to the file. If our
properties file is converted
to ISO_8859_1 (using native2ascii) then special characters in French or German
do not get displayed
correctly in a Windows NT command (i.e. Dos) window. My colleague suggested a
workaround of specifying the
file.encoding on the java command to
be Cp850. This had an effect but did not work. I then experimented trying to
use an OutputStreamWriter and for
the purpose of my test, I tried hardcoding "Cp850" as the encoding.
I found out from doing this that
the JRE does not support this encoding -- this is true for both the
JRE 1.1.4 and JRE 1.1.5 on NT.
So, my first question is "why is Cp850 not supported on the
JREs?".
Since the JRE does not support Cp850, what effect will specifying the
file.encoding=Cp850 have when running the JRE. It does not cause an exception
nor does it work.
I would like for it to be my silver bullet; make the output to the screen look
correct on
System.out.println calls and have the ISO_8859_1 encoding be used when writing
to the
file. I am concerned that setting the file.encoding=Cp850 will adversely
affect my
file output.
Submitted On 07-APR-1998
SWOLICKI
One extra comment: for both US Windows and Polish Windows environment the
standard file.encoding is not iso-8859-x but cp1250 for Polish and cp1252 for
US. Use:
Properties p = System.getProperties();
System.out.println( p );
to check it.
Submitted On 07-APR-1998
SWOLICKI
I have just investigated the problem for the Polish customer. It seems that
specifying -Dfile.encoding=cp852 on java's command line solves it for Polish.
I wonder why it should not work for cp850. Look into i18n.jar coming with JDK.
Cp850 CharToByte converter is there.
Maybe some programming problem? Or Console Window configuration problem?
Submitted On 05-FEB-2001
zhouyi
This is a important bug, I have same problem to face. We
try to use our java program to be supported on command line
interface, but the out put character for FR and DE's accent
character are not correct. I don't who has a good idea for
this bug. I hope sun can fix this.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|