Closed lisuiheng closed 8 years ago
Hello,
What is the command you are executing?
Have you tried the same command using PowerShell console?
Regards
I use command is Get-MsolUser -All when name contain chinese is will be Garbled I using PowerShell console output no problem
when I use an other method ,it's no problem too:
Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec(str); proc.getOutputStream().close(); InputStream inputstream = proc.getInputStream(); InputStreamReader inputstreamreader = new InputStreamReader(inputstream, "GBK");
Hello,
JPowerShell uses UTF-8 so normally you have no need to make encoding conversions in order to show chinese characters. Is your system/jvm using UTF-8 as default encoding? Are you launching directly on console or maybe from your IDE? Have you tried the flag -Dfile.encoding=UTF8?
thanks
PowerShellResponse response = powerShell.executeCommand(getAll); //Print results System.out.println("result :" + response.getCommandOutput());
chinese output will Garbled but I can not find how to change coding