diff --git a/markdown_generator/PubsFromBib.ipynb b/markdown_generator/PubsFromBib.ipynb index df898a7128007..af8f045188024 100644 --- a/markdown_generator/PubsFromBib.ipynb +++ b/markdown_generator/PubsFromBib.ipynb @@ -182,7 +182,7 @@ "\n", " md_filename = os.path.basename(md_filename)\n", "\n", - " with open(\"../_publications/\" + md_filename, 'w') as f:\n", + " with open(\"../_publications/\" + md_filename, 'w', encoding=\"utf-8\") as f:\n", " f.write(md)\n", " print(f'SUCESSFULLY PARSED {bib_id}: \\\"', b[\"title\"][:60],\"...\"*(len(b['title'])>60),\"\\\"\")\n", " # field may not exist for a reference\n", @@ -220,4 +220,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} +} \ No newline at end of file diff --git a/markdown_generator/pubsFromBib.py b/markdown_generator/pubsFromBib.py index 92b4d02f942f3..8ae3e6227282a 100644 --- a/markdown_generator/pubsFromBib.py +++ b/markdown_generator/pubsFromBib.py @@ -151,7 +151,7 @@ def html_escape(text): md_filename = os.path.basename(md_filename) - with open("../_publications/" + md_filename, 'w') as f: + with open("../_publications/" + md_filename, 'w', encoding="utf-8") as f: f.write(md) print(f'SUCESSFULLY PARSED {bib_id}: \"', b["title"][:60],"..."*(len(b['title'])>60),"\"") # field may not exist for a reference