[Python-3000] str/unicode tests: pyexpat.c and read(n) (original) (raw)
Talin talin at acm.org
Mon Jul 23 02:13:47 CEST 2007
- Previous message: [Python-3000] str/unicode tests: pyexpat.c and read(n)
- Next message: [Python-3000] removing exception .args
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greg Ewing wrote:
Guido van Rossum wrote:
Now I'm confused. Are we proposing that all our XML APIs read and write encoded bytes, or are we proposing that they read and write Unicode strings, leaving the encoding/decoding to the I/O stream? The design of XML seems a bit braindamaged here, with the encoding specification being inside the XML itself, rather than being something specified externally. It's a bit like a self-opening letter that works by having a letter opener sealed inside the envelope. You can open it, but you have to open it first...
All of the popular XML parsers have self-bootstrapping code that handles detection of the encoding, including auto-detection when no encoding is specified.
So basically - don't worry about it, it's taken care of.
-- Talin
- Previous message: [Python-3000] str/unicode tests: pyexpat.c and read(n)
- Next message: [Python-3000] removing exception .args
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]