From 3e396b3782813d36d46195564cd0e111422bcaf5 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Tue, 22 Jun 2021 22:59:16 +0200 Subject: fix: Always explicitly set encoding for text files (fixes #8263) --- mesonbuild/mcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/mcompile.py') diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index d6f54e3..6e526f6 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -58,7 +58,7 @@ def parse_introspect_data(builddir: Path) -> T.Dict[str, T.List[dict]]: path_to_intro = builddir / 'meson-info' / 'intro-targets.json' if not path_to_intro.exists(): raise MesonException(f'`{path_to_intro.name}` is missing! Directory is not configured yet?') - with path_to_intro.open() as f: + with path_to_intro.open(encoding='utf-8') as f: schema = json.load(f) parsed_data = defaultdict(list) # type: T.Dict[str, T.List[dict]] -- cgit v1.1