Re: What happend whith áéíóú ?.
System.out.println() writes characters to the console using "the platform's
default character encoding", according to the java documentation. This
encoding is probably ISO-8859-1 on your system. But the DOS box uses a
different encoding (probably either CP437 or CP850 on your system), which
handles the accented characters differently.
Try something like this:
OutputStreamWriter osw = new OutputStreamWriter(System.out, "CP437");
To do this you will need the "internationalized" version of the JVM. It
contains a file called "i18n.jar" that you need to have in your classpath
when you run this.
I haven't tried this myself; I noticed the problem but didn't consider it to
be important enough for me to fix. So I am not sure that it will work. The
graphical user interfaces (AWT and Swing) do not have this problem.
Cesar <email@example.com> wrote in message
> What happend whith áéíóú ?.
> I have a program in Java that displays messages in Españish, the
> peogram run in MS-DOS (c:\java program) but I can seen the special
> characters like á é í ó ú.
> Can you tell me how I can print that chars.
> Thanks a lot.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center