• Guido van Rossum's avatar
    See discussion at SF bug 547537. · a883a3d5
    Guido van Rossum yazdı
    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).
    a883a3d5
cStringIO.c 19.4 KB