Skip to content
This repository was archived by the owner on Nov 14, 2021. It is now read-only.

Commit ea1a91e

Browse files
committed
fix: Windows encoding problem
1 parent 8bf0a23 commit ea1a91e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

narkdown/exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,5 +507,5 @@ def create_directory(path):
507507

508508

509509
def write_post(post, path, title):
510-
file = open(path + "/" + title + ".md", "w")
511-
file.write(post)
510+
with open(path + "/" + title + ".md", "w", encoding="utf-8") as f:
511+
f.write(post)

0 commit comments

Comments
 (0)