fix: add utf-8 to fix encoding bugs with articles which contain special chars
This commit is contained in:
@@ -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}")
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user