[issue8391] os.execvpe() doesn't support surrogates in env

STINNER Victor report at bugs.python.org
Mon Apr 26 00:40:54 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

I blocked the fix in Python 3.1 because it's non trivial and I prefer to avoid complex changes in Python 3.1. But then I realized that Python 3.1 has two bugs about environment variables.

It uses sys.getfilesystemencoding()+surrogateecape to decode variables and sys.getdefaultencoding()+strict to encode variables: the encoding is different!

It counts the number of *characters* to allocate the *byte* string buffer and so non-ASCII values are truncated.

So I decided to backport the fix: r80494.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8391>
_______________________________________


More information about the Python-bugs-list mailing list