You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/serhiy-storchaka'closed_at=<Date2016-10-04.17:10:19.838>created_at=<Date2016-09-30.22:57:38.388>labels= ['3.7', 'type-bug', 'library']
title='Plistlib: Half of the double width characters are missing when writing binary plist'updated_at=<Date2017-03-31.16:36:39.033>user='https://bugs.python.org/kuglee'
I read an emoji character from a plist file. The emoji printed correctly to stdout. However when I dump the file to a binary plist only the half of the emoji was present.
>>> 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/plistlib.py", line 1006, in loads
fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
File "/usr/lib/python3.5/plistlib.py", line 997, in load
return p.parse(fp)
File "/usr/lib/python3.5/plistlib.py", line 623, in parse
return self._read_object(self._object_offsets[top_object])
File "/usr/lib/python3.5/plistlib.py", line 704, in _read_object
return self._fp.read(s * 2).decode('utf-16be')
File "/usr/lib/python3.5/encodings/utf_16_be.py", 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
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: