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 pitrou
Recipients pitrou, vstinner
Date 2010-09-08.23:16:33
SpamBayes Score 3.5673295e-07
Marked as misclassified No
Message-id <1283987795.55.0.476279078119.issue9804@psf.upfronthosting.co.za>
In-reply-to
Content
Or perhaps not, since we would like surrogate pairs to be fused in other cases (ascii() of other types) as well.

So "backslashreplace" would need to be changed instead:

>>> print("\U00012345".encode('ascii', 'backslashreplace'))
b'\\ud808\\udf45'

Expected result (already works in UCS4 builds):

>>> print("\U00012345".encode('ascii', 'backslashreplace'))
b'\\U00012345'
History
Date User Action Args
2010-09-08 23:16:35pitrousetrecipients: + pitrou, vstinner
2010-09-08 23:16:35pitrousetmessageid: <1283987795.55.0.476279078119.issue9804@psf.upfronthosting.co.za>
2010-09-08 23:16:33pitroulinkissue9804 messages
2010-09-08 23:16:33pitroucreate