Message159452
| Author |
taschini |
| Recipients |
cben, eric.araujo, loewis, ness, ping, r.david.murray, rhettinger, taschini |
| Date |
2012年04月27日.12:21:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335529319.58.0.751505375377.issue1065986@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here's my patch, along the lines of the work-around I posted earlier. A few remarks:
1. The modifications in pydoc only touch the four console pagers and the html pager (html.page).
2. A module-wide default encoding is initialized from locale.getpreferredencoding. Pagers that write to a file use the encoding of that file if defined, else they use the module-wide default. The html pager uses ascii. All of them use xml character entity replacement as fall-back.
3. An additional set of tests has been added to test.test_pydoc to verify the behaviour of the modifications.
4. No functionality is broken if Python is built without unicode support. |
|