This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ness
Recipients cben, loewis, ness, ping, rhettinger
Date 2012-04-12.14:49:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

[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/", line 1318, in pager
  File "/usr/lib/python2.7/", line 1332, in <lambda>
    return lambda text: pipepager(text, os.environ['PAGER'])
  File "/usr/lib/python2.7/", line 1359, in pipepager
UnicodeEncodeError: 'ascii' codec can't encode character u'\u211a' in position 0: ordinal not in range(128)

Date User Action Args
2012-04-12 14:49:10nesssetrecipients: + ness, loewis, ping, rhettinger, cben
2012-04-12 14:49:10nesssetmessageid: <>
2012-04-12 14:49:09nesslinkissue1065986 messages
2012-04-12 14:49:09nesscreate