[Python-bugs-list] [ python-Bugs-216388 ] cStringIO rejects Unicode strings
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 18 Apr 2002 05:53:59 -0700
Bugs item #216388, was opened at 2000-10-08 20:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=216388&group_id=5470
Category: Unicode
Group: Feature Request
Status: Open
>Resolution: Remind
Priority: 5
Submitted By: Paul Prescod (prescod)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: cStringIO rejects Unicode strings
Initial Comment:
>>> import cStringIO
>>> s=cStringIO.StringIO(u"abcdefgh")
Traceback (innermost last):
File "<pyshell#8>", line 1, in ?
s=cStringIO.StringIO(u"abcdefgh")
TypeError: expected string, unicode found
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-18 08:53
Message:
Logged In: YES
user_id=6380
Hm, that's bad. An error on write(u"...") is much preferred
over wreiting garbage. :-(
----------------------------------------------------------------------
Comment By: Anthony Baxter (anthonybaxter)
Date: 2002-04-18 02:38
Message:
Logged In: YES
user_id=29957
Hm. This no longer produces the above error. However, it
now produces:
>>> import cStringIO
>>> s=cStringIO.StringIO(u"abcdefgh")
>>> s.getvalue()
'a\x00b\x00c\x00d\x00e\x00f\x00g\x00h\x00'
Should it produce a unicode string back?
(thought I'd go through some of the older sf bugs)
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2002-04-04 06:18
Message:
Logged In: NO
9;lo;;99999999999999999999999
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2002-03-01 17:31
Message:
Logged In: YES
user_id=31392
Setting back to normal priority for 2.2
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-01-16 21:29
Message:
Lowered priority to reflect my previous comments; I don't think I'll have time to do this for Python 2.1.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-01-10 11:07
Message:
Status: Jim said I can work on it, but the priority isn't very high for him.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-01-07 22:56
Message:
Ok, ok, ok... I've sent a prod to appropriate people. This *should* be interesting to have done.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2000-12-12 16:00
Message:
Assigned to Fred -- maybe you can prod Jim into looking into this.
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2000-10-09 04:34
Message:
I've marked this as feature request since making the standard
lib Unicode compatible is a post-2.0 project (probably a good
one for 2.1).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=216388&group_id=5470