diff --git a/IPython/frontend/qt/svg.py b/IPython/frontend/qt/svg.py index 8081dca..aa2bf4b 100644 --- a/IPython/frontend/qt/svg.py +++ b/IPython/frontend/qt/svg.py @@ -21,6 +21,9 @@ def save_svg(string, parent=None): The name of the file to which the document was saved, or None if the save was cancelled. """ + if isinstance(string, unicode): + string = string.encode('utf-8') + dialog = QtGui.QFileDialog(parent, 'Save SVG Document') dialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) dialog.setDefaultSuffix('svg')