Permalink
Browse files

fix UnicodeEncodeError writing SVG string to .svg file, fixes #489

  • Loading branch information...
1 parent 5163e14 commit 5acdcc184f701528102a81e39e9873e18e3ff443 @mspacek mspacek committed Jun 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/frontend/qt/svg.py
@@ -29,7 +29,7 @@ def save_svg(string, parent=None):
filename = dialog.selectedFiles()[0]
f = open(filename, 'w')
try:
- f.write(string)
+ f.write(string.encode('UTF-8'))
finally:
f.close()
return filename

0 comments on commit 5acdcc1

Please sign in to comment.