New submission from Torsten Landschoff <t.landsch...@gmx.net>:
With the attached file doc.py I see the following behaviour:
tors...@ddhp3:~$ pydoc doc
Traceback (most recent call last):
File "/usr/bin/pydoc", line 5, in <module>
pydoc.cli()
File "/usr/lib/python2.6/pydoc.py", line 2309, in cli
help.help(arg)
File "/usr/lib/python2.6/pydoc.py", line 1773, in help
elif request: doc(request, 'Help on %s:')
File "/usr/lib/python2.6/pydoc.py", line 1516, in doc
pager(render_doc(thing, title, forceload))
File "/usr/lib/python2.6/pydoc.py", line 1323, in pager
pager(text)
File "/usr/lib/python2.6/pydoc.py", line 1343, in <lambda>
return lambda text: pipepager(text, 'less')
File "/usr/lib/python2.6/pydoc.py", line 1364, in pipepager
pipe.write(text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 184-186:
ordinal not in range(128)
With the terminal on sys.stdout I get "UTF-8" as the encoding
(sys.stdout.encoding), therefore I would expect this to work. It would be
helpful to have an option to set the encoding when running pydoc as well.
And, of course, accessing the documentation via a web browser (pydoc -p 8000,
firefox http://localhost:8000) I get a blank screen for the doc.py example. And
a backtrace on the terminal where I started pydoc.
----------
components: Unicode
files: doc.py
messages: 107774
nosy: torsten
priority: normal
severity: normal
status: open
title: pydoc does not support non-ascii docstrings
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file17666/doc.py
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8994>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com