Skip to content
Browse files

Specify UTF-8 encoding for saving notebook as script.

  • Loading branch information...
1 parent ddeaebc commit 3a5bb53525a0541dd964c677389ab8a4015e692e @takluyver committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/frontend/html/notebook/notebookmanager.py
View
2 IPython/frontend/html/notebook/notebookmanager.py
@@ -213,7 +213,7 @@ def save_notebook_object(self, notebook_id, nb):
if self.save_script:
pypath = os.path.splitext(path)[0] + '.py'
try:
- with io.open(pypath,'w') as f:
+ with io.open(pypath,'w', encoding='utf-8') as f:
current.write(nb, f, u'py')
except Exception as e:
raise web.HTTPError(400, u'Unexpected error while saving notebook as script: %s' % e)

0 comments on commit 3a5bb53

Please sign in to comment.
Something went wrong with that request. Please try again.