[issue4213] Lower case file system encoding

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Le Thursday 30 October 2008 23:14:21 Martin v. Löwis, vous avez écrit : > 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), My p

[issue4213] Lower case file system encoding

2008-10-30 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> 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 gene

[issue4213] Lower case file system encoding

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Fixed in r67055 -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4213] Lower case file system encoding

2008-10-28 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Me, too! The solution is elegant and works well. Barry still has to accept the patch, though. -- resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]>

[issue4213] Lower case file system encoding

2008-10-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: +1 on adding Viktor's patch. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs

[issue4213] Lower case file system encoding

2008-10-27 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Victor's patch fixes the issue with #3723. ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4213] Lower case file system encoding

2008-10-27 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Here is a patch to get the "most common charset name": use codecs.lookup(codeset).name. Added file: http://bugs.python.org/file11896/get_codeset.patch ___ Python tracker <[EMAIL PROTECTED]>

[issue4213] Lower case file system encoding

2008-10-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: The lower-casing doesn't hurt, since that's done anyway during codec lookup, but I'd be -1 on making this try to duplicate the aliasing already done by the encodings package. -- nosy: +lemburg

[issue4213] Lower case file system encoding

2008-10-27 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Converting to the lower case doesn't solve the problem: if the locale is "utf8" and Python checks for "utf-8", the optimization will fail. Another example: iso-8859-1, latin-1 or latin1? A correct patch would be to get the most common name

[issue4213] Lower case file system encoding

2008-10-27 Thread Christian Heimes
New submission from Christian Heimes <[EMAIL PROTECTED]>: Python should lower case the file system encoding in Python/pythonrun.c. On several occasions Python optimizes code paths for lower case encodings like "utf-8" or "latin-1". On my Ubuntu system the file system encoding is upper case ("UTF-