WMI4Java icon indicating copy to clipboard operation
WMI4Java copied to clipboard

Stderr- and stdout-Encoding are not respected

Open upeuker opened this issue 8 years ago • 3 comments

In WMIVBScript#executeScript the encoding of the input from stdout and stderr will not be respected. This will lead to a problem with german "umlauts" or possibly with characters used in the commandline of an process. As an example you will not found a process searching for this parameter in the commandline args.

The InputStreamReaders for stderr and stdout should be explicit initialized with the definied encoding for the windows environment (for Oracle Java it could be found in the env-Properties "sun.stdout.encoding" or "sun.stderr.encoding". I don't know if an default value of "cp850" oder "IBM850" would fit for every windows system?

upeuker avatar Jul 12 '17 13:07 upeuker

Hello,

I have updated the jPowerShell dependency from 1.7 => 1.9. In 1.8 version a problem with the encoding was solved. Try with 1.6.1

Best regards

profesorfalken avatar Oct 22 '17 13:10 profesorfalken

Hello! I made pull request yesterday that may solve this problem https://github.com/profesorfalken/WMI4Java/pull/12 . I can make pull request to master instead development branch.

Happy New Year!

sergeir82 avatar Dec 27 '17 07:12 sergeir82

Hi! Any update on this? I've tested @sergeir82 PR and it works.

weekens avatar Jan 10 '19 11:01 weekens