changeset: 71162:81424281ee59 branch: 3.2 parent: 71157:419871c62bb3 user: Victor Stinner date: Mon Jul 04 01:25:55 2011 +0200 files: Lib/xml/dom/pulldom.py Misc/NEWS description: 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 -r 419871c62bb3 -r 81424281ee59 Lib/xml/dom/pulldom.py --- a/Lib/xml/dom/pulldom.py Sun Jul 03 16:25:11 2011 -0500 +++ b/Lib/xml/dom/pulldom.py Mon Jul 04 01:25:55 2011 +0200 @@ -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 -r 419871c62bb3 -r 81424281ee59 Misc/NEWS --- a/Misc/NEWS Sun Jul 03 16:25:11 2011 -0500 +++ b/Misc/NEWS Mon Jul 04 01:25:55 2011 +0200 @@ -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 -----

AltStyle によって変換されたページ (->オリジナル) /