Marc-Andre Lemburg <m...@egenix.com> added the comment: STINNER Victor wrote: > > STINNER Victor <victor.stin...@haypocalc.com> added the comment: > > Here you have a patch. It adds tests in test_sys. > > The tests are skipped on a non-ascii Python executable path because of #8611 > (see #9425).
Thanks for the patch. A couple of notes: * The command line -h explanation is missing from the patch. * The documentation should mention that the env var is only read once; subsequent changes to the env var are not seen by Python * If the codec lookup fails, Python should either issue a warning and then ignore the env var (using the get_codeset() API). * Unrelated to the env var, but still important: if get_codeset() does not return a known codec, Python should issue a warning before falling back to the default setting. Otherwise, a Python user will never know that there's an issue and this make debugging a lot harder. We should also add a new sys.setfilesystemencoding() function to make changes possible after Python startup. This would have to go on a separate ticket, though. Or is there some concept preventing this ? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8622> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com