This commit was manufactured by cvs2svn to create tag 'wxPy_2_6_4_0'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPy_2_6_4_0@44989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2007-03-20 20:36:57 +00:00
parent 219ee9ba9d
commit 2c6b0ab87d
2304 changed files with 240793 additions and 262981 deletions

View File

@@ -407,7 +407,13 @@ _SaferCreateProcess(appName=%r,
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,