New submission from STINNER Victor <victor.stin...@haypocalc.com>:

It would be nice to support the PEP 383 (surrogateescape) for environment 
variables in os.execvpe(). Attached patch uses PyUnicode_AsEncodedString(val, 
Py_FileSystemDefaultEncoding, "surrogateescape") to encode an environment 
variable value.

I'm not sure that PyUnicode_AsEncodedString(val, Py_FileSystemDefaultEncoding, 
"surrogateescape") does always return a PyBytes object.

I not patched environment keys, but it might be useful.

----------
components: Library (Lib), Unicode
files: os_execvpe_surrogates.patch
keywords: patch
messages: 103100
nosy: haypo
severity: normal
status: open
title: os.execvpe() doesn't support surrogates in env
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file16918/os_execvpe_surrogates.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8391>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to