Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
of the text mode (using the locale encoding) to avoid encoding issues.
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index 81a36b0..d5ac8b2 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -326,7 +326,7 @@
if bufsize is None:
bufsize = default_bufsize
if isinstance(stream_or_string, str):
- stream = open(stream_or_string)
+ stream = open(stream_or_string, 'rb')
else:
stream = stream_or_string
if not parser:
diff --git a/Misc/NEWS b/Misc/NEWS
index 250acc2..1d76698 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -19,6 +19,9 @@
Library
-------
+- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
+ of the text mode (using the locale encoding) to avoid encoding issues.
+
C-API
-----