Amaury Forgeot d'Arc added the comment:
Better use utf-16-le encoding:
len(data.encode('utf-16-le')) + 2
otherwise the encoded bytes start with the \fffe BOM.---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue22999> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
