]> granicus.if.org Git - python/commit
See discussion at SF bug 547537.
authorGuido van Rossum <guido@python.org>
Mon, 29 Apr 2002 13:54:48 +0000 (13:54 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 29 Apr 2002 13:54:48 +0000 (13:54 +0000)
commita883a3d5fdfefdf198bd34f6d07273063bc1f3b5
treedb37a916190c759d44f2f318779961f953a9acf7
parent81b9251d5996ec89bcc016c29ecc0b5f0204e59b
See discussion at SF bug 547537.

Unicode objects are currently taken as binary data by the write()
method.  This is not what Unicode users expect, nor what the
StringIO.py code does.  Until somebody adds a way to specify binary or
text mode for cStringIO objects, change the format string to use "t#"
instead of "s#", so that it will request the "text buffer" version.
This will try the default encoding for Unicode objects.

This is *not* a 2.2 bugfix (since it *is* a semantic change).
Modules/cStringIO.c