summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2010-06-18 17:21:09 +0200
committerThorsten Behrens <tbehrens@novell.com>2010-06-18 17:21:09 +0200
commitb22c72c15c93227e76bdc7bff1c350abec06aa21 (patch)
treeebc6d271f33158768e52ee29632e651ece1c9641
parentdaea655716bf86609b5704108c18fe8a39f1f831 (diff)
Properly utf-8 encode tweaked xml before zipping
-rw-r--r--examples/ooxml-strict/dumpsample.py2
-rw-r--r--examples/ooxml-strict/xls_sample.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/ooxml-strict/dumpsample.py b/examples/ooxml-strict/dumpsample.py
index ace94e4..f0cf8cf 100644
--- a/examples/ooxml-strict/dumpsample.py
+++ b/examples/ooxml-strict/dumpsample.py
@@ -42,6 +42,6 @@ else:
for i in range(worklist.iterations(mimetype)):
contentIter()
currOutFile = outDir+"/"+inFileName+str(iteration)+inFileExt
- package.copyWithReplace(currOutFile,{fragment: sax_instance.toxml()})
+ package.copyWithReplace(currOutFile,{fragment: sax_instance.toxml().encode('utf-8')})
iteration += 1
print "Written "+currOutFile
diff --git a/examples/ooxml-strict/xls_sample.py b/examples/ooxml-strict/xls_sample.py
index 55c16ba..ac51035 100644
--- a/examples/ooxml-strict/xls_sample.py
+++ b/examples/ooxml-strict/xls_sample.py
@@ -42,6 +42,6 @@ else:
for i in range(worklist.iterations(mimetype)):
contentIter()
currOutFile = outDir+"/"+inFileName+str(iteration)+inFileExt
- package.copyWithReplace(currOutFile,{fragment: sax_instance.toxml()})
+ package.copyWithReplace(currOutFile,{fragment: sax_instance.toxml().encode('utf-8')})
iteration += 1
print "Written "+currOutFile