Skip to content

Commit

Permalink
Add UTF-8 encoding when writing an encrypted file
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinovsky committed Sep 5, 2024
1 parent f49a9cb commit 5e02d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lean/commands/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def encrypt(project: Path,
except Exception as e:
raise RuntimeError(f"Could not encrypt project {project}: {e}")
for file, encrypted in zip(source_files, encrypted_data):
with open(file, 'w') as f:
with open(file, 'w', encoding="utf-8") as f:
f.write(encrypted)

# Mark the project as encrypted
Expand Down

0 comments on commit 5e02d3f

Please sign in to comment.