Skip to content

Commit

Permalink
Merge pull request #228 from caomingpei/master
Browse files Browse the repository at this point in the history
Fix encoding issue for other characters set
  • Loading branch information
fralau committed Jun 2, 2024
2 parents 590232c + a26a60b commit 9a08f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mkdocs_macros/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def _load_yaml(self):
# Paths are be relative to the project root.
filename = os.path.join(self.project_dir, filename)
if os.path.isfile(filename):
with open(filename) as f:
with open(filename, encoding="utf-8") as f:
# load the yaml file
# NOTE: for the SafeLoader argument, see: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
content = yaml.load(f, Loader=yaml.SafeLoader)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

def read_file(fname):
"Read a local file"
return open(os.path.join(os.path.dirname(__file__), fname)).read()
return open(os.path.join(os.path.dirname(__file__), fname), encoding="utf-8").read()


setup(
Expand Down

0 comments on commit 9a08f11

Please sign in to comment.