diff --git a/material/plugins/blog/plugin.py b/material/plugins/blog/plugin.py index ef343100b..375b8cfe7 100644 --- a/material/plugins/blog/plugin.py +++ b/material/plugins/blog/plugin.py @@ -861,7 +861,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Create a file with the given content on disk def _save_to_file(self, path: str, content: str): os.makedirs(os.path.dirname(path), exist_ok = True) - with open(path, "w") as f: + with open(path, "w", encoding = "utf-8") as f: f.write(content) # ------------------------------------------------------------------------- diff --git a/src/plugins/blog/plugin.py b/src/plugins/blog/plugin.py index ef343100b..375b8cfe7 100644 --- a/src/plugins/blog/plugin.py +++ b/src/plugins/blog/plugin.py @@ -861,7 +861,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Create a file with the given content on disk def _save_to_file(self, path: str, content: str): os.makedirs(os.path.dirname(path), exist_ok = True) - with open(path, "w") as f: + with open(path, "w", encoding = "utf-8") as f: f.write(content) # -------------------------------------------------------------------------