[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

Torsten Bronger report at bugs.python.org
Wed Jan 21 16:43:29 CET 2009


Torsten Bronger <bronger at physik.rwth-aachen.de> added the comment:

I ran into this problem today when writing python data structures into a
database.  Only ASCII is safe in this situation.  I understood the
Python docs that protocol 0 was ASCII-only.

I use pickle+base64 now, however, this makes debugging more difficult.

Anyway, I think that the docs should clearly say that protocol 8 is not
ASCII-only because this is important in the Python world.  For example,
I saw this issue because Django makes an implicit unicode() conversion
with my input which fails with non-ASCII.

----------
nosy: +bronger

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2980>
_______________________________________


More information about the Python-bugs-list mailing list