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 Michael.Felt
Recipients Michael.Felt
Date 2018-08-06.20:10:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533586254.96.0.56676864532.issue34347@psf.upfronthosting.co.za>
In-reply-to
Content
In short, I do not understand how this passes on Linux.

This is python3-3.4.6 on sles12:

>>> 'h\xe9\u20ac'.encode('utf-8')
b'h\xc3\xa9\xe2\x82\xac'
>>> ascii('h\xe9\u20ac'.encode('utf-8'))
"b'h\\xc3\\xa9\\xe2\\x82\\xac'"
>>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape')
'h\udcc3\udca9\udce2\udc82\udcac'
>>>

This is python3-3.7.0 on AIX:
>>> 'h\xe9\u20ac'.encode('utf-8')
b'h\xc3\xa9\xe2\x82\xac'
>>> ascii('h\xe9\u20ac'.encode('utf-8'))
"b'h\\xc3\\xa9\\xe2\\x82\\xac'"
>>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape')
'h\udcc3\udca9\udce2\udc82\udcac'

If I am missing something essential here - please be blunt!
History
Date User Action Args
2018-08-06 20:10:54Michael.Feltsetrecipients: + Michael.Felt
2018-08-06 20:10:54Michael.Feltsetmessageid: <1533586254.96.0.56676864532.issue34347@psf.upfronthosting.co.za>
2018-08-06 20:10:54Michael.Feltlinkissue34347 messages
2018-08-06 20:10:54Michael.Feltcreate