From 155b242f2c7dfc5d281e2884181611a173487a99 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 28 May 2024 18:23:48 +0000 Subject: [PATCH] project: use new Manifest.encoding constant (utf-8) to read manifest Fixes issue reported in PR #710 where most places are hardcoded to 'utf-8' while this one is (Windows) locale-dependent. In the future, we may want to make this more flexible but the most urgent fix is consistency: with this commit, manifest decoding should be hardcoded to 'utf-8' everywhere. Signed-off-by: Marc Herbert --- src/west/app/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/west/app/project.py b/src/west/app/project.py index ed7d230c..0ffe1e5a 100644 --- a/src/west/app/project.py +++ b/src/west/app/project.py @@ -321,7 +321,7 @@ def bootstrap(self, args) -> Path: # Parse the manifest to get "self: path:", if it declares one. # Otherwise, use the URL. Ignore imports -- all we really # want to know is if there's a "self: path:" or not. - manifest = Manifest.from_data(temp_manifest.read_text(), + manifest = Manifest.from_data(temp_manifest.read_text(encoding=Manifest.encoding), import_flags=ImportFlag.IGNORE) if manifest.yaml_path: manifest_path = manifest.yaml_path