[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding
Serhiy Storchaka added the comment: Already fixed in issue1470548. -- nosy: +serhiy.storchaka resolution: - out of date stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding
Gunnar Aastrand Grimnes gromg...@gmail.com added the comment: I came across the bug when trying to write XML documents to StringIO objects. This does not work, since the output contains a mix of unicode and str objects, and StringIO gets confused. A better alternative is to use io.BytesIO, since all output should be encoded, but this also throws an error since it gets some unicode objects. The attached file breaks for both cases (comment/uncomment StringIO to test) -- Added file: http://bugs.python.org/file21389/xmltest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding
New submission from Gunnar Aastrand Grimnes gromg...@gmail.com: The startElementNS method in the XMLGenerator ignores the encoding set. it does: self._out.write(' xmlns:%s=%s' % (prefix, uri)) whereas it should have done: self._write(' xmlns:%s=%s' % (prefix, uri)) Issue 938076 was similar to this, but for a different method. -- components: XML messages: 131863 nosy: gromgull priority: normal severity: normal status: open title: startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you have a test or a small script which shows the incorrect output? -- nosy: +amaury.forgeotdarc stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com