Commit 174a451e authored by Yusei Tahara's avatar Yusei Tahara

ERP5OOo: stream may be unicode. If so, convert it to utf-8 string.

parent 231adcaf
...@@ -110,6 +110,8 @@ class OOoBuilder(Implicit): ...@@ -110,6 +110,8 @@ class OOoBuilder(Implicit):
except KeyError: except KeyError:
# This is a new file # This is a new file
pass pass
if isinstance(stream, unicode):
stream = stream.encode('utf-8')
zf.writestr(filename, stream) zf.writestr(filename, stream)
zf.close() zf.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment