[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-17 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Okay to close this, then? -- nosy: +georg.brandl resolution: -> wont fix status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-15 Thread Mark Summerfield
Mark Summerfield <[EMAIL PROTECTED]> added the comment: You're right that the parser should not recognise "utf8" since it isn't correct XML (as per the references you gave). I made the mistake because I used the etree module and wrote an XML file with encoding "utf8" which etree accepted. I've n

[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-13 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Should the parser recognize "utf8"? I looked at the XML standard [1] and it referred me to the IANA's charts [2]. It appears the the only correct way to denote UTF-8 is "UTF-8". [1] http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-Encodin

[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-13 Thread Mark Summerfield
Changes by Mark Summerfield <[EMAIL PROTECTED]>: -- components: +Library (Lib), XML type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___ Pyt

[issue2278] [Py30a3] xml.parsers.expat recognizes encoding="utf-8" but not encoding="utf8"

2008-03-12 Thread Mark Summerfield
New submission from Mark Summerfield <[EMAIL PROTECTED]>: Here is how to reproduce the bug: from xml.etree.ElementTree import parse import io xml1 = """ text""" xml2 = """ text""" f1 = io.StringIO(xml1) f2 = io.StringIO(xml2) tree2 = parse(f2) # this uses "utf-8" and works fine tree1 = parse(f1)