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 ezio.melotti, serhiy.storchaka, vstinner, zuo
Date 2013-11-10.07:05:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The 'raw_unicode_escape' codec can't be neither removed nor changed because it is used in pickle protocol. Just don't use it if its behavior looks weird for you.

Right way to decode raw_unicode_escape-encoded data is use 'raw_unicode_escape' decoder.

If a string don't contain quotes, you can use eval(), but you should first decode data from latin1 and encode to UTF-8:

>>> literal = ('r"%s"' % "zażółć".encode('raw_unicode_escape').decode('latin1')).encode()
>>> literal
>>> eval(literal)
Date User Action Args
2013-11-10 07:05:29serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, zuo
2013-11-10 07:05:29serhiy.storchakasetmessageid: <>
2013-11-10 07:05:29serhiy.storchakalinkissue19539 messages
2013-11-10 07:05:28serhiy.storchakacreate