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
fralau authored Jun 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 590232c + a26a60b commit 9a08f11
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
@@ -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)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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(

0 comments on commit 9a08f11

Please sign in to comment.