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 serhiy.storchaka
Recipients Nam.Nguyen, arigo, eric.araujo, ezio.melotti, lemburg, liori, r.david.murray, serhiy.storchaka, vstinner
Date 2013-08-23.13:31:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In Python 3 ascii() uses the backslashreplace error handler.

>>> class T:
...     def __repr__(self):
...         return '\u20ac\udcff'
>>> print(ascii(T()))

I think using the backslashreplace error handler in repr() in Python 2.7 is good solution. Here is a patch.
Date User Action Args
2013-08-23 13:31:13serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, arigo, vstinner, ezio.melotti, eric.araujo, r.david.murray, liori, Nam.Nguyen
2013-08-23 13:31:13serhiy.storchakasetmessageid: <>
2013-08-23 13:31:13serhiy.storchakalinkissue5876 messages
2013-08-23 13:31:13serhiy.storchakacreate