Any reason why cStringIO in 2.5 behaves different from 2.4?

Stefan Scholl stesch at no-spoon.de
Fri Jul 27 04:58:11 EDT 2007


Stefan Behnel <stefan.behnel-n05pAM at web.de> wrote:
> Stefan Scholl wrote:
>> Stefan Behnel <stefan.behnel-n05pAM at web.de> wrote:
>>> The XML is *not* well-formed if you pass Python unicode instead of a byte
>>> encoded string. Read the XML spec.
>> 
>> Pointers, please.
> 
> There you have it:
> 
> http://www.w3.org/TR/xml/#charencoding
> 
> """
> In the absence of information provided by an external transport protocol (e.g.
> HTTP or MIME), it is a *fatal error* for an entity including an encoding
> Byte Order Mark nor an encoding declaration to use an encoding other than UTF-8.
> """

> specific). You might argue that there is some kind of "external transportation
> protocol" as it is a Python Unicode string (I used that excuse when I

Not the string itself. The method that ist called: parseString()




More information about the Python-list mailing list