Message114208
STINNER Victor wrote:
>
> STINNER Victor <victor.stinner@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 ? |
|
Date |
User |
Action |
Args |
2010-08-18 10:33:47 | lemburg | set | recipients:
+ lemburg, pitrou, vstinner, Arfrever |
2010-08-18 10:33:46 | lemburg | link | issue8622 messages |
2010-08-18 10:33:45 | lemburg | create | |
|