commit: 0742a5a62058db8c3b8ff5d21e8fe662915d8cd2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> AuthorDate: Thu Aug 10 12:27:21 2017 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Thu Aug 10 12:27:21 2017 +0000 URL: https://gitweb.gentoo.org/proj/javatoolkit.git/commit/?id=0742a5a6
swap around string encoding src/py/javatoolkit/xml/SaxRewriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py/javatoolkit/xml/SaxRewriter.py b/src/py/javatoolkit/xml/SaxRewriter.py index bd6e8de..f9e224a 100644 --- a/src/py/javatoolkit/xml/SaxRewriter.py +++ b/src/py/javatoolkit/xml/SaxRewriter.py @@ -115,7 +115,7 @@ class SaxRewriter(XMLGenerator): def p(self,str): - self.buffer.write(str.encode('utf8')) + self.buffer.write(str) def write_attr(self,a,v): @@ -125,7 +125,7 @@ class SaxRewriter(XMLGenerator): def process(self, in_stream, callback): self.startElement = callback from xml.sax import parseString - parseString(in_stream, self) + parseString(in_stream.encode('UTF8'), self) self.p('\n') # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: