summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/sax/expatreader.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index ab8cbc1..bb9c294 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -243,13 +243,14 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
def reset(self):
if self._namespaces:
- self._parser = expat.ParserCreate(None, " ",
+ self._parser = expat.ParserCreate(self._source.getEncoding(), " ",
intern=self._interning)
self._parser.namespace_prefixes = 1
self._parser.StartElementHandler = self.start_element_ns
self._parser.EndElementHandler = self.end_element_ns
else:
- self._parser = expat.ParserCreate(intern = self._interning)
+ self._parser = expat.ParserCreate(self._source.getEncoding(),
+ intern = self._interning)
self._parser.StartElementHandler = self.start_element
self._parser.EndElementHandler = self.end_element