Skip to content

Commit

Permalink
Use UTF-8 instead of system encoding for gallery metadata.yml file
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 7, 2018
1 parent 60a40a4 commit caa2495
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -23,6 +23,7 @@ Features
Bugfixes
--------

* Use UTF-8 instead of system encoding for gallery metadata.yml file
* Do not remove first heading in document (reST document title)
if ``USE_REST_DOCINFO_METADATA`` is disabled (Issue #3124)
* Remove ``NO_DOCUTILS_TITLE_TRANSFORM`` setting,
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/galleries.py
Expand Up @@ -464,7 +464,7 @@ def find_metadata(self, gallery, lang):

self.logger.debug("Using {0} for gallery {1}".format(
used_path, gallery))
with open(used_path, "r") as meta_file:
with open(used_path, "r", encoding='utf-8-sig') as meta_file:
if yaml is None:
utils.req_missing(['PyYAML'], 'use metadata.yml files for galleries')
meta = yaml.safe_load_all(meta_file)
Expand Down

0 comments on commit caa2495

Please sign in to comment.