mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Use cp1252 encoding on Windows for cmd output
This commit is contained in:
@@ -787,9 +787,10 @@ def runcmd(cmd, getOutput=False, echoCmd=True, fatal=True):
|
||||
|
||||
output = None
|
||||
if getOutput:
|
||||
outputEncoding = 'cp1252' if sys.platform == 'win32' else 'utf-8'
|
||||
output = sp.stdout.read()
|
||||
if sys.version_info > (3,):
|
||||
output = output.decode('utf-8', 'ignore') # TODO: is utf-8 okay here?
|
||||
output = output.decode(outputEncoding)
|
||||
output = output.rstrip()
|
||||
|
||||
rval = sp.wait()
|
||||
|
||||
Reference in New Issue
Block a user