From 28430bad0e7a4d4c11710d61fbaf1c598bffa87d Mon Sep 17 00:00:00 2001 From: hatoo Date: Tue, 6 Aug 2024 18:35:05 +0900 Subject: [PATCH] Fix visual_studio.py to call vswhere with -utf8 (#32949) In Japanese Windows, `vswhere` puts cp932 string in default and fails to load json in Pyhton. This fixes it by adding `-utf8` option Signed-off-by: hatoo --- python/servo/visual_studio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/servo/visual_studio.py b/python/servo/visual_studio.py index c63ffe2f54c..1c0b99e8c03 100644 --- a/python/servo/visual_studio.py +++ b/python/servo/visual_studio.py @@ -57,7 +57,8 @@ def find_compatible_msvc_with_vswhere() -> Generator[VisualStudioInstallation, N '-format', 'json', '-products', '*', '-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', - '-requires', 'Microsoft.VisualStudio.Component.Windows10SDK' + '-requires', 'Microsoft.VisualStudio.Component.Windows10SDK', + '-utf8' ]).decode(errors='ignore') for install in json.loads(output):