Skip to content

Commit 7faaf29

Browse files
committed
add utf8
1 parent 6a0df85 commit 7faaf29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jupyter_sphinx/execute.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def write_notebook_output(notebook, output_dir, notebook_name):
259259
# Write a script too.
260260
ext = notebook.metadata.language_info.file_extension
261261
contents = "\n\n".join(cell.source for cell in notebook.cells)
262-
with open(os.path.join(output_dir, notebook_name + ext), "w") as f:
262+
with open(os.path.join(output_dir, notebook_name + ext), "w",
263+
encoding = "utf8") as f:
263264
f.write(contents)
264265

265266

0 commit comments

Comments
 (0)