Any reason why cStringIO in 2.5 behaves different from 2.4?

Stefan Scholl stesch at no-spoon.de
Thu Jul 26 16:48:22 EDT 2007


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.

Last time I read that part of the spec was when a customer's
consulting company switched to ISO-8859-15 without saying
something beforehand. The old code (PHP) I have to maintain
couldn't deal with it.

It was wrong to switch encoding without telling somebody about
it. And a XML processor isn't required to support ISO-8859-15.
But I thought it was too embarrassing not to support this
encoding. I fixed that part without making a fuss.


A Python XML processor that can't handle the own encoding is
embarrassing. It isn't required to support it. It would be OK if
it wouldn't support UTF-7. But a parseString() method that
doesn't want Python strings? No way!


-- 
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/



More information about the Python-list mailing list