From 3d5612b609a8b9027cb19f73813e5c5f64e9bd43 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 20 Feb 2025 12:02:50 +0100 Subject: [PATCH] Always use utf8 encoding for licenses CURA-12400 --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 2dc0f36637..c1335573a6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -167,7 +167,7 @@ class CuraConan(ConanFile): sources_archive.extract(source_file, temp_dir) license_file_path = os.path.join(temp_dir, source_file) - with open(license_file_path, 'r') as file: + with open(license_file_path, 'r', encoding='utf8') as file: dependency_description["license_full"] = file.read() def _make_pip_dependency_description(self, package, version, dependencies): @@ -250,7 +250,7 @@ class CuraConan(ConanFile): for file_name in files: license_file = os.path.join(clone_dir, file_name) if os.path.exists(license_file): - with open(license_file, 'r') as file: + with open(license_file, 'r', encoding='utf8') as file: return file.read() break