Skip to content

Commit 9a08f11

Browse files
authored
Merge pull request #228 from caomingpei/master
Fix encoding issue for other characters set
2 parents 590232c + a26a60b commit 9a08f11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mkdocs_macros/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def _load_yaml(self):
373373
# Paths are be relative to the project root.
374374
filename = os.path.join(self.project_dir, filename)
375375
if os.path.isfile(filename):
376-
with open(filename) as f:
376+
with open(filename, encoding="utf-8") as f:
377377
# load the yaml file
378378
# NOTE: for the SafeLoader argument, see: https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
379379
content = yaml.load(f, Loader=yaml.SafeLoader)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

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

3131

3232
setup(

0 commit comments

Comments
 (0)