diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-04 17:08:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-04 17:08:29 (GMT) |
commit | db8d6265fa86a7cb9d7c5e4d60e3b342edc90176 (patch) | |
tree | 08a881907b27ab5cfe8ffc3a6e4e84a797bb338f /Lib/plistlib.py | |
parent | 27b40981f7529f2be8031fe4cfd5e5391f789743 (diff) | |
parent | 7338ebc4ba00366fa2c4f592630c2acd98c178d8 (diff) | |
download | cpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.zip cpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.tar.gz cpython-db8d6265fa86a7cb9d7c5e4d60e3b342edc90176.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 4f360f3..09be5fd 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) |