projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More compile fixes.
[wxWidgets.git]
/
wxPython
/
samples
/
ide
/
activegrid
/
tool
/
process.py
diff --git
a/wxPython/samples/ide/activegrid/tool/process.py
b/wxPython/samples/ide/activegrid/tool/process.py
index a521f0cf509d27cc5dbc2663c0cf9d12341867be..1de68e1bc91eeda0f3470bdffa1d4f8455ba123d 100644
(file)
--- a/
wxPython/samples/ide/activegrid/tool/process.py
+++ b/
wxPython/samples/ide/activegrid/tool/process.py
@@
-407,7
+407,13
@@
_SaferCreateProcess(appName=%r,
elif env:
uenv = {}
for key, val in env.items():
elif env:
uenv = {}
for key, val in env.items():
- uenv[unicode(key)] = unicode(val)
+ try:
+ uenv[unicode(key)] = unicode(val) # default encoding
+ except UnicodeError:
+ try:
+ uenv[unicode(key, 'iso-8859-1')] = unicode(val, 'iso-8859-1') # backup encoding
+ except UnicodeError:
+ log.warn('Skipping environment variable "%s" in execution process: unable to convert to unicode using either the default encoding or ISO-8859-1' % (key))
env = uenv
hProcess, hThread, processId, threadId\
= win32process.CreateProcess(appName, cmd, processSA,
env = uenv
hProcess, hThread, processId, threadId\
= win32process.CreateProcess(appName, cmd, processSA,