[issue4213] Lower case file system encoding

Martin v. Löwis report at bugs.python.org
Thu Oct 30 23:14:21 CET 2008


Martin v. Löwis <martin at v.loewis.de> added the comment:

> The solution is elegant and works well.

I can't agree with that evaluation. In cases where Python would fail
without this patch (i.e. because the file system encoding cannot be
found during startup), this solution doesn't work well in general - it
only works if the file system encoding happens to be UTF-8. If the file
system encoding is not in the list of "builtin" codec names, startup
would still fail.

r67057 addresses this case in a somewhat more general manner, by falling
back to ASCII during startup, for encoding file names. This should work
in the usual case where Python is in /usr/bin (say), but it's still
possible to make it fail, e.g. if the codecs are in /home/Питон (say),
on a system that uses koi8-r as the file system encoding, this bug would
persist despite the two patches that have been applied.

----------
nosy: +loewis

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


More information about the Python-bugs-list mailing list