From c20650fe970e98c904996986ebfed703a5f92e40 Mon Sep 17 00:00:00 2001 From: alexvoss Date: Fri, 12 Dec 2025 10:45:02 -0500 Subject: [PATCH] fix:zensical encoding errors reading mkdocs.yml (#189) Signed-off-by: alexvoss --- python/zensical/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/zensical/config.py b/python/zensical/config.py index e9a2785..4143fca 100644 --- a/python/zensical/config.py +++ b/python/zensical/config.py @@ -98,7 +98,7 @@ def parse_zensical_config(path: str) -> dict: def parse_mkdocs_config(path: str) -> dict: """Parse mkdocs.yml configuration file.""" global _CONFIG # noqa: PLW0603 - with open(path) as f: + with open(path, encoding="utf-8") as f: config = _yaml_load(f) # Apply defaults and return parsed configuration @@ -756,7 +756,7 @@ def _yaml_load( raise ConfigurationError( f"Inherited config file '{relpath}' doesn't exist at '{abspath}'." ) - with open(abspath) as fd: + with open(abspath, encoding="utf-8") as fd: parent = _yaml_load(fd, loader) config = always_merger.merge(parent, config)