fix: add utf-8 to fix encoding bugs with articles which contain special chars

This commit is contained in:
Alexandre Pinel
2024-07-19 11:34:22 +03:00
parent a3ac64ab5d
commit a0aeefb558
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ def generate_markdown(topic):
filename = os.path.join(output_directory, f'{topic.replace(" ", "_")}.md')
with open(filename, "w") as md_file:
with open(filename, "w", encoding="utf-8") as md_file:
md_file.write(markdown_text)
print(f"Markdown file created: {filename}")

View File

@@ -32,7 +32,7 @@ def generate_markdown(topic):
filename = os.path.join(directory, f"{topic.replace(' ', '_')}.md")
with open(filename, "w") as md_file:
with open(filename, "w", encoding="utf-8") as md_file:
md_file.write(markdown_text)
print(f"Markdown file created: {filename}")