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 kuglee, ronaldoussoren, serhiy.storchaka
Date 2016-10-01.06:33:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The simplest reproducer:

>>> import plistlib
>>> plistlib.loads(plistlib.dumps('\U0001f40d', fmt=plistlib.FMT_BINARY))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/", line 1006, in loads
    fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
  File "/usr/lib/python3.5/", line 997, in load
    return p.parse(fp)
  File "/usr/lib/python3.5/", line 623, in parse
    return self._read_object(self._object_offsets[top_object])
  File "/usr/lib/python3.5/", line 704, in _read_object
    return * 2).decode('utf-16be')
  File "/usr/lib/python3.5/encodings/", line 16, in decode
    return codecs.utf_16_be_decode(input, errors, True)
UnicodeDecodeError: 'utf-16-be' codec can't decode bytes in position 0-1: unexpected end of data

Proposed patch fixes this issue.
Date User Action Args
2016-10-01 06:33:15serhiy.storchakasetrecipients: + serhiy.storchaka, ronaldoussoren, kuglee
2016-10-01 06:33:15serhiy.storchakasetmessageid: <>
2016-10-01 06:33:15serhiy.storchakalinkissue28321 messages
2016-10-01 06:33:14serhiy.storchakacreate