Skip to content

Commit 2a4ee76

Browse files
authored
Merge pull request #41 from RalfG/fix-issue-40
Specify encoding when reading file in write_nb (fixes #40)
2 parents 873f9b7 + 8fecf22 commit 2a4ee76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

execnb/nbio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ def write_nb(nb, path):
9191
"Write `nb` to `path`"
9292
new = nb2str(nb)
9393
path = Path(path)
94-
old = Path(path).read_text() if path.exists() else None
94+
old = Path(path).read_text(encoding="utf-8") if path.exists() else None
9595
if new!=old:
9696
with open(path, 'w', encoding='utf-8') as f: f.write(new)

0 commit comments

Comments
 (0)