From d990f72b1e1de0e29e8d2b9bec1088d1189dec20 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Thu, 6 Mar 2025 22:01:24 +0900 Subject: [PATCH] Decode messages from `dotnet tool` as UTF-8 If 'dotnet tool' outputs non-ASCII characters and the system locale is not 'utf-8', then 'update_deps.py' can fail due to UnicodeDecodeError. This commit addresses the above issue by explicitly setting 'utf-8' when calling subprocess.Popen. Closes #1203 --- src/build_tools/update_deps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build_tools/update_deps.py b/src/build_tools/update_deps.py index 68457abe4..d67936e64 100644 --- a/src/build_tools/update_deps.py +++ b/src/build_tools/update_deps.py @@ -408,6 +408,7 @@ def exec_command( process = subprocess.Popen( args, cwd=cwd, + encoding='utf-8', shell=False, stdout=subprocess.PIPE, text=True,