我正在从Java程序执行命令,我必须在不同的语言环境中运行该程序,而从日语语言环境中运行该程序,我得到日语字符作为响应,但是Java程序给我输出乱码,如何转换这些字符转换为JAVA中的ASCII字符
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(command);
br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
br1 = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
proc.waitFor();
String str = br.readLine();
while (str != null)
{
result = result + str + "\n";//NO I18N
str = br.readLine();
}
str = br1.readLine();
while (str != null)
{
result = result + str;
str = br1.readLine();
}