[issue10783] struct.pack() and Unicode strings
R. David Murray
report at bugs.python.org
Tue Dec 28 04:47:42 CET 2010
R. David Murray <rdmurray at bitdance.com> added the comment:
>>> struct.pack('2s', 'ha')
b'ha'
>>> struct.pack('2s', 'hé')
b'h\xc3'
>>> struct.pack('3s', 'hé')
b'h\xc3\xa9'
That looks like a *buggy* api to me, too. I don't see how we can let that stand.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10783>
_______________________________________
More information about the Python-bugs-list
mailing list