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 lazka
Recipients ezio.melotti, lazka, vstinner
Date 2016-09-06.09:59:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473155983.16.0.820045644056.issue27971@psf.upfronthosting.co.za>
In-reply-to
Content
Using Python 2.7.12

>>> u"\ud83d".encode("utf-16-le")
'=\xd8'
>>> u"\ud83d".encode("utf-16-le").decode("utf-16-le")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/encodings/utf_16_le.py", line 16, in decode
    return codecs.utf_16_le_decode(input, errors, True)
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 0-1: unexpected end of data
>>>
History
Date User Action Args
2016-09-06 09:59:43lazkasetrecipients: + lazka, vstinner, ezio.melotti
2016-09-06 09:59:43lazkasetmessageid: <1473155983.16.0.820045644056.issue27971@psf.upfronthosting.co.za>
2016-09-06 09:59:42lazkalinkissue27971 messages
2016-09-06 09:59:42lazkacreate