Restore utf-8 compatibility for python 2

This commit is contained in:
Guillaume Poulin 2013-09-10 22:34:20 +08:00
parent 59ada9b1b4
commit b48e0e9eb5

View File

@ -92,8 +92,8 @@ class SVGExporter(Exporter):
md.setData('image/svg+xml', QtCore.QByteArray(xml.encode('UTF-8')))
QtGui.QApplication.clipboard().setMimeData(md)
else:
with open(fileName, 'wt') as fh:
fh.write(asUnicode(xml))
with open(fileName, 'wb') as fh:
fh.write(asUnicode(xml).encode('utf-8'))
xmlHeader = """\