[issue1065986] Fix pydoc crashing on unicode strings
Stefano Taschini
report at bugs.python.org
Fri Apr 27 14:21:59 CEST 2012
Stefano Taschini <taschini at ieee.org> added the comment:
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.
----------
Added file: http://bugs.python.org/file25380/issue1065986.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1065986>
_______________________________________
More information about the Python-bugs-list
mailing list