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.
This commit is contained in:
parent
ac91341333
commit
bbdc08ea6e
|
@ -326,7 +326,7 @@ def parse(stream_or_string, parser=None, bufsize=None):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue