diff options
author | 2017-08-10 14:27:21 +0200 | |
---|---|---|
committer | 2017-08-10 14:27:21 +0200 | |
commit | 0742a5a62058db8c3b8ff5d21e8fe662915d8cd2 (patch) | |
tree | 1bda56ff330eca55af965901eba340b4cb8ba1ee | |
parent | doesn't convert str to UTF8 (diff) | |
download | javatoolkit-0742a5a62058db8c3b8ff5d21e8fe662915d8cd2.tar.gz javatoolkit-0742a5a62058db8c3b8ff5d21e8fe662915d8cd2.tar.bz2 javatoolkit-0742a5a62058db8c3b8ff5d21e8fe662915d8cd2.zip |
swap around string encoding
-rw-r--r-- | src/py/javatoolkit/xml/SaxRewriter.py | 4 |
1 files 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: |