diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-04 17:04:30 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-04 17:04:30 (GMT) |
commit | 7338ebc4ba00366fa2c4f592630c2acd98c178d8 (patch) | |
tree | e2ee56692ed4450f6b208ed13156c6097feb61ef /Lib/plistlib.py | |
parent | 7fd9f4b458dcc6416ccbc9731889a765f5df7960 (diff) | |
download | cpython-7338ebc4ba00366fa2c4f592630c2acd98c178d8.zip cpython-7338ebc4ba00366fa2c4f592630c2acd98c178d8.tar.gz cpython-7338ebc4ba00366fa2c4f592630c2acd98c178d8.tar.bz2 |
Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
Diffstat (limited to 'Lib/plistlib.py')
-rw-r--r-- | Lib/plistlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/plistlib.py b/Lib/plistlib.py index b66639c..2502b39 100644 --- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -918,7 +918,7 @@ class _BinaryPlistWriter (object): self._write_size(0x50, len(value)) except UnicodeEncodeError: t = value.encode('utf-16be') - self._write_size(0x60, len(value)) + self._write_size(0x60, len(t) // 2) self._fp.write(t) |