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

STINNER Victor report at bugs.python.org
Sat Aug 14 00:32:01 CEST 2010


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

Le vendredi 13 août 2010 20:36:22, vous avez écrit :
> The CS_PATH variable is a colon-separated list of directories ("the value
> for the PATH environment variable that finds all standard utilities"), so
> the file system encoding is certainly correct there.

CS_PATH is hardcoded to "/bin:/usr/bin" in the GNU libc for UNIX. Do you know 
another key for which the value can be controled by the user (or the system 
administrator)?

> I don't see any reference to an encoding in the POSIX spec for confstr().

CS_PATH is just an example, there are other keys. I'm not sure that all values 
are encoded to the filesystem encodings, it might be another encoding?

Well, if we really doesn't know the encoding, a solution is to use a bytes API 
(which may avoid the question of the usage of the PEP 383).

----------

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


More information about the Python-bugs-list mailing list