[issue2980] Pickle stream for unicode object may contain non-ASCII characters.
Marc-Andre Lemburg
report at bugs.python.org
Wed May 28 00:41:32 CEST 2008
Marc-Andre Lemburg <mal at egenix.com> added the comment:
On 2008-05-28 00:21, Martin v. Löwis wrote:
> Martin v. Löwis <martin at v.loewis.de> added the comment:
>
>> How can a data format be printable ASCII and at the same time use
>> non-ASCII characters ?
>
> The "format" is the frame defining the structure. In the binary
> formatter, it's a binary format. In the standard pickle format,
> it's ASCII (I for int, S for string, and so on, line-separated).
I think there's a misunderstanding there. The pickle version 0
output used to be 7-bit only for both type code and content.
While adding the Unicode support I must have forgotten about the
fact that raw-unicode-escape does not escape range(128, 256) code
points. Unfortunately, there's no way to fix this now, since the
bug has been around since Python 1.6.
That's why I think we should update the docs.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2980>
_______________________________________
More information about the Python-bugs-list
mailing list