[Python-Dev] XML codec? (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Fri Nov 9 00:30:21 CET 2007
- Previous message: [Python-Dev] XML codec?
- Next message: [Python-Dev] XML codec?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ci = codecs.lookup("xml-auto-detect") p = expat.ParserCreate() e = "utf-32" s = (u"" % e).encode(e) s = ci.encode(ci.decode(s)[0], encoding="utf-8")[0] p.Parse(s, True)
So how come the document being parsed is recognized as UTF-8?
OK, so should I put the C code into a xml module?
I don't see the need for C code at all.
Regards, Martin
- Previous message: [Python-Dev] XML codec?
- Next message: [Python-Dev] XML codec?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]