[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 18e23f227be59241cbb1eeb6d6669771dd7275fb by Stefan Behnel (Miss Islington (bot)) in branch '3.7': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718)

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +13605 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/13718 ___ Python tracker ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: fixed -> stage: resolved -> backport needed status: closed -> open versions: +Python 3.7 ___ Python tracker ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 5ac0b988fd5f1428efe35329c531c7b5c74d37f6 by Stefan Behnel (Windson yang) in branch 'master': bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13352)

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-31 Thread Stefan Behnel
Stefan Behnel added the comment: Asking users unconditionally to use the "xmlcharrefreplace" replacement method seems wrong for UTF-8. It should not be necessary. We should, however, document explicitly that the file will receive text and not bytes, i.e. that users are themselves

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-15 Thread Windson Yang
Windson Yang added the comment: I added a PR for like this: .. note:: You should specify the "xmlcharrefreplace" error handler when open a file with specified encoding:: writer = open( filename, "w", encoding="utf-8",

[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-15 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +13263 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2016-01-09 Thread Ezio Melotti
Ezio Melotti added the comment: > On Python 3 you should not only open file in text mode with specified > encoding, but also specify the "xmlcharrefreplace" error handler. Isn't this only required in case there are non encodable characters? If the encoding is utf-8, this shouldn't be necessary

[issue18911] minidom does not encode correctly when calling Document.writexml

2016-01-09 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2015-11-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.3 ___ Python tracker

[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-13 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: -eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18911 ___ ___ Python-bugs-list

[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18911 ___

[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On Python 3 you should not only open file in text mode with specified encoding, but also specify the xmlcharrefreplace error handler. doc.writexml(open(filename, w, encoding=utf-8, errors=xmlcharrefreplace), , , utf-8) I can suggest only one solution

[issue18911] minidom does not encode correctly when calling Document.writexml

2013-09-02 Thread Brian Vanderburg
New submission from Brian Vanderburg: When I have unicode data to save, it seems that it does not save correctly, giving an encode error. I know this exists on 2.7 and from checking the code in xml/dom/minidom.py it looks like it does in 3.2 as well. The method call that seem to be