This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vdupras
Recipients vdupras
Date 2008-03-18.13:27:56
SpamBayes Score 0.4679655
Marked as misclassified No
Message-id <1205846879.92.0.0083654313835.issue2387@psf.upfronthosting.co.za>
In-reply-to
Content
hsoft-dev:python hsoft$ python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cStringIO import StringIO
>>> StringIO(u'foo').read()
'foo'
>>> 
hsoft-dev:python hsoft$ ./python.exe 
Python 2.6a1+ (trunk:61515, Mar 18 2008, 13:38:47) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cStringIO import StringIO
>>> StringIO(u'foo').read()
'f\x00o\x00o\x00'
>>> 

The documentation says:

Unlike the memory files implemented by the StringIO module, those provided by 
this module are not able to accept Unicode strings that cannot be encoded as 
plain ASCII strings.

Attached a patch to test_StringIO.
History
Date User Action Args
2008-03-18 13:28:00vduprassetspambayes_score: 0.467966 -> 0.4679655
recipients: + vdupras
2008-03-18 13:27:59vduprassetspambayes_score: 0.467966 -> 0.467966
messageid: <1205846879.92.0.0083654313835.issue2387@psf.upfronthosting.co.za>
2008-03-18 13:27:58vdupraslinkissue2387 messages
2008-03-18 13:27:57vduprascreate