[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-05-31 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) https://github.com/python/cpython/commit/18e23f227be59241cbb

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

2019-05-31 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-05-31 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-05-31 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-05-31 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) https://github.com/python/cpython/commit/5ac0b988fd5f1428efe35329

[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 responsible

[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", errors="xmlcharre

[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 ___ ___ Pyt

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[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

2015-12-31 Thread R. David Murray
R. David Murray added the comment: It means a function defined in the module namespace, as opposed to as a method on a class, so that 'from xml.dom.minidom import ' will get you that function. This issue should be for documentation of the problem, since we won't add the function to 2.7. A ne

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

2015-12-31 Thread Upendra Kumar
Upendra Kumar added the comment: I am trying to resolve a issue for the first time. Can anybody please tell me or elaborate what is "module level function" specifically in this context. -- nosy: +upendra-k14 ___ 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 : -- nosy: -eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

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

2013-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Py

[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

[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 problematic