Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with umlaute charactes while executing a command in German MS-DoS

807580Aug 31 2009 — edited Sep 3 2009
Hi,

I am trying to execute a command in MS-DOS in German OS.Outputstream contains Umlaute characters.It is garbled,when i read the stream using BufferedReader

String encoding="UTF-8";
String command = "cmd.exe /c query process "*; // command will be anything like ipconfig,netstat /s
Runtime r = Runtime.getRuntime();
Process p = r.exec(command);
InputStreamReader isr = new InputStreamReader(p.getInputStream(), encoding);
BufferedReader br=new BufferedReader(isr);

I had tried with multiple encodings,still getting either ??? or boxes for the Umlaute characters.Pls help me to resovle this Issue!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2009
Added on Aug 31 2009
26 comments
1,063 views