[Python-bugs-list] [Bug #126161] pickling the string u'\\u' is impossible in Python 2.0
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 18 Dec 2000 18:09:33 -0800
Bug #126161, was updated on 2000-Dec-18 00:52
Here is a current snapshot of the bug.
Project: Python
Category: Unicode
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Submitted by: nobody
Assigned to : gvanrossum
Summary: pickling the string u'\\u' is impossible in Python 2.0
Details: >>> import pickle
>>> s = unicode('\u')
>>> f = open("aaaaa.a", "w")
>>> pickle.dump(s, f)
>>> f.close()
>>> f = open("aaaaa.a", "r")
>>> s = pickle.load(f)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "d:\python20\lib\pickle.py", line 901, in load
return Unpickler(file).load()
File "d:\python20\lib\pickle.py", line 516, in load
dispatch[key](self)
File "d:\python20\lib\pickle.py", line 630, in load_unicode
self.append(unicode(self.readline()[:-1],'raw-unicode-escape'))
UnicodeError: Unicode-Escape decoding error: truncated \uXXXX
>>>
Follow-Ups:
Date: 2000-Dec-18 18:09
By: gvanrossum
Comment:
Fixed in cPickle too. cPickle.c rev. 2.54.
-------------------------------------------------------
Date: 2000-Dec-18 17:29
By: gvanrossum
Comment:
Fixed in pickle.py, CVS rev 1.41. Still need to to cPickle.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=126161&group_id=5470