Tom Bachmann <e_mc...@web.de> added the comment: Hello,
[this is my first bug report, so I'm sorry if I'm not adhering to some conventions] in what versions of python is this supposed to be fixed? Consider: % python Python 2.7.2+ (default, Nov 30 2011, 19:22:03) [GCC 4.6.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pydoc import pager >>> from locale import getpreferredencoding >>> expr = u'\u211a' >>> pager(expr) # error >>> pager(expr.encode(getdefaultencoding())) # works The error is: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/pydoc.py", line 1318, in pager pager(text) File "/usr/lib/python2.7/pydoc.py", line 1332, in <lambda> return lambda text: pipepager(text, os.environ['PAGER']) File "/usr/lib/python2.7/pydoc.py", line 1359, in pipepager pipe.write(text) UnicodeEncodeError: 'ascii' codec can't encode character u'\u211a' in position 0: ordinal not in range(128) Best, Tom ---------- nosy: +ness _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1065986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com