[issue9580] os.confstr() doesn't decode result according to PEP 383

STINNER Victor report at bugs.python.org
Fri Aug 13 01:52:40 CEST 2010


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

Can you give me examples of configuration keys with undecodable values?

PyUnicode_DecodeFSDefault(AndSize) encoding depends on the locale whereas PyUnicode_FromString uses utf-8. I don't know the encoding of confstr() values.

You can decode an utf-8 value using surrogateescape (PEP 383 error handler) with PyUnicode_DecodeUTF8(value, strlen(value), "surrogateescape").

----------

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


More information about the Python-bugs-list mailing list