Changes by Serhiy Storchaka storch...@gmail.com:
--
versions: +Python 3.4 -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
Python-bugs-list
Mark Summerfield m...@qtrac.eu added the comment:
Perhaps a useful compromise would be to add an encoding attribute that is set
to the encoding of the XML file that's read in (and with a default of ascii).
That way it would be possible to preserve the encoding, e.g.:
import
Stefan Behnel sco...@users.sourceforge.net added the comment:
lxml.etree has encapsulated this in a 'docinfo' property which also holds the
XML 'version', the 'standalone' state and the DOCTYPE (if available).
Note that this information is readily available in lxml.etree for any parsed
Mark Summerfield m...@qtrac.eu added the comment:
I don't see how lxml is relevant here? lxml is a third party library, whereas
etree is part of the standard library. And according to the 3.1.2 docs etree
doesn't have a docinfo (or any other) property.
--
Stefan Behnel sco...@users.sourceforge.net added the comment:
That's why I mention it here to prevent future incompatibilities between the
two libraries.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
Stefan Behnel sco...@users.sourceforge.net added the comment:
I think it makes sense to keep input and output separate. After all, the part
of the software that outputs a document doesn't necessarily know how it came
in, so having the default output encoding depend on the input sounds error
Florent Xicluna florent.xicl...@gmail.com added the comment:
It behaves as documented. Moved to feature request.
http://docs.python.org/library/xml.etree.elementtree.html
--
components: +XML
type: behavior - feature request
versions: +Python 3.2, Python 3.3 -Python 3.1
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +scoder
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
Python-bugs-list
New submission from Mark Summerfield m...@qtrac.eu:
If you read in an XML file that specifies its encoding and then later on use
xml.etree.ElementTree.write(), it is always written using US-ASCII.
I think the behaviour should be different:
(1) If the XML that was read included an encoding,
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +effbot, flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9522
___
___
11 matches
Mail list logo