Skip to content

Commit

Permalink
fix: windows decoding in marimo convert (#3041)
Browse files Browse the repository at this point in the history
Fixes #3035, 

but it is odd that the tests pass without this.
  • Loading branch information
mscolnick authored Dec 3, 2024
1 parent 33857ae commit f059581
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion marimo/_cli/convert/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def convert(
if output:
# Make dirs if needed
maybe_make_dirs(output)
with open(output, "w") as f:
with open(output, "w", encoding="utf-8") as f:
f.write(notebook)
echo(f"Converted notebook saved to {output}")
else:
Expand Down
2 changes: 1 addition & 1 deletion marimo/_cli/export/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def write_data(data: str) -> None:
if output:
# Make dirs if needed
maybe_make_dirs(output)
with open(output, "w") as f:
with open(output, "w", encoding="utf-8") as f:
f.write(data)
f.close()
else:
Expand Down

0 comments on commit f059581

Please sign in to comment.