[issue6625] UnicodeEncodeError on pydoc's CLI
Berker Peksag added the comment: I suppose this is a duplicate of #1065986. Yes, it is. I created a test file from the tests in issue6625_pydoc.diff and ran it on the current 2.7 branch. def foo(): ufooo bar baz \xfcnicode\u2026 return 42 def bar(): uf\xfcr Elise return 11 -- nosy: +berker.peksag resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Torsten Landschoff added the comment: I tested this as well and it seems to work now. :-) Thanks for fixing it! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Akira Kitada added the comment: I suppose this is a duplicate of #1065986. -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Changes by Florent Xicluna florent.xicl...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Florent Xicluna la...@yahoo.fr added the comment: Patch with same tests as the previous one, but using better heuristic for output encoding (like Christoph patch). Added the replace error handling, if the output encoding cannot encode all characters. -- Added file: http://bugs.python.org/file16296/issue6625_pydoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Christoph Burgmer cburg...@ira.uka.de added the comment: Here is a diff for test/test_pydoc.py (against Python2.6) which though doesn't trigger due to how Python handles output encoding. This test here will pass, but pydoc will still fail: $ pydoc test/pydoc_mod.py /dev/null Traceback (most recent call last): File /usr/bin/pydoc, line 5, in module pydoc.cli() File /usr/lib/python2.5/pydoc.py, line 2226, in cli help.help(arg) File /usr/lib/python2.5/pydoc.py, line 1691, in help else: doc(request, 'Help on %s:') File /usr/lib/python2.5/pydoc.py, line 1482, in doc pager(title % desc + '\n\n' + text.document(object, name)) File /usr/lib/python2.5/pydoc.py, line 1300, in pager pager(text) File /usr/lib/python2.5/pydoc.py, line 1398, in plainpager sys.stdout.write(plain(text)) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 936: ordinal not in range(128) -- Added file: http://bugs.python.org/file14656/pydoc_unicode_testcase_notworking.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: After applying your patch, are string (not unicode) docstrings still being handled properly? Adding a test case (in Lib/test/test_pydoc.py) would be nice too. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6625] UnicodeEncodeError on pydoc's CLI
New submission from Christoph Burgmer cburg...@ira.uka.de: pydoc fails with a UnicodeEncodeError for properly specified Unicode docstrings (u...) on the command line interface. See attached patch that encodes the output with the system's encoding. -- components: Extension Modules files: unicode.patch keywords: patch messages: 91182 nosy: christoph severity: normal status: open title: UnicodeEncodeError on pydoc's CLI versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file14626/unicode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com