Is it possible to change the language settings for just a single process call?
In Linux i would do a LANG=C myprocess
.
I need to use the java keytool, but the output is in german and contains umlauts, which is very bad to parse afterwards. Can it changed to english?
The program looks like this:
from subprocess import call, Popen, PIPE
keytool_path = "C:\\Program Files\\Java\\jdk1.7.0_13\\bin\\keytool.exe"
p = Popen([keytool_path, "-printcert", "-file", "CERT.RSA"], stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
o = out.decode("ISO-8859-1")