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

Haukur Hreinsson report at bugs.python.org
Tue May 27 17:38:15 CEST 2008


New submission from Haukur Hreinsson <python at mawbid.com>:

I'm not sure if this is a functionality or documentation bug.

The docs say in section 13.1.2, Data stream format
(http://docs.python.org/lib/node315.html):
"By default, the pickle data format uses a printable ASCII representation."

I took that to mean that only ASCII characters ever appear in the pickle
output, but that's not true.

>>> print [ord(c) for c in pickle.dumps(u'á')]
[86, 225, 10, 112, 48, 10, 46]

----------
assignee: georg.brandl
components: Documentation, Library (Lib)
messages: 67410
nosy: Mawbid, georg.brandl
severity: normal
status: open
title: Pickle stream for unicode object may contain non-ASCII characters.
type: feature request
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2980>
__________________________________


More information about the New-bugs-announce mailing list