Florent Xicluna <florent.xicl...@gmail.com> added the comment: It seems the documentation is not enough accurate.
"Unlike the StringIO module, this module is not able to accept Unicode strings that cannot be encoded as plain ASCII strings." I understand that u'foo' can be encoded as plan ASCII, however it does not behave correctly with cStringIO. Python 2.7.3 (default, Apr 14 2012, 01:49:35) >>> from cStringIO import StringIO >>> StringIO(u'foo').read() 'f\x00o\x00o\x00' >>> ---------- nosy: +flox resolution: rejected -> status: closed -> open versions: +Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2387> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com