This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients serhiy.storchaka, skip.montanaro
Date 2015-02-01.20:59:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CANc-5UxR9RO4DmsobbYQLy=GFuWLYJcZtX=3UaoE9MUjbukOmw@mail.gmail.com>
In-reply-to <CANc-5UzK4hnHPQMA1R_HHm2Ca57qrTOq2LZncKkNmzo0m75XUQ@mail.gmail.com>
Content
Final note here. Peter also did a bit of digging. Here's his note about
what he found on c.l.py:

The pager is invoked by os.popen(), and after some digging I find that it
uses a io.TestIOWrapper() to write the help text. This in turn uses
locale.getpreferredencoding(False), i. e. you were right to set LANG and
PYTHONIOENCODING is not relevant.

I was also able to provoke this problem on an openSuSE 12.2 system with
3.2.3 installed. In that environment (confirmed by Chris Angelico on his
Linux system), the case of "utf" didn't matter, nor did it matter if
"utf-8" was hyphenated or not. Obviously the Mac continues to be a rather
touchy system w.r.t. locale.

I don't know if Python should try to be accommodating here, but my
inclination is "no". OTOH, maybe io.TestIOWrapper should look at
PYTHONIOENCODING, or the pager should be invoked through something other
than os.popen (assuming there is a suitable replacement which does pay
attention to PYTHONIOENCODING).
History
Date User Action Args
2015-02-01 20:59:39skip.montanarosetrecipients: + skip.montanaro, serhiy.storchaka
2015-02-01 20:59:39skip.montanarolinkissue23374 messages
2015-02-01 20:59:38skip.montanarocreate