From 1879d182706260c3f4de9e3da2cf9ff4f35a8a7d Mon Sep 17 00:00:00 2001 From: Taylor Date: Thu, 9 May 2024 16:14:00 -0700 Subject: [PATCH] fix: set encoding for python tools to utf-8 Signed-off-by: Taylor Price --- pkg/repos/runtimes/python/python.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/repos/runtimes/python/python.go b/pkg/repos/runtimes/python/python.go index 56ed5f0a..e229e304 100644 --- a/pkg/repos/runtimes/python/python.go +++ b/pkg/repos/runtimes/python/python.go @@ -134,6 +134,9 @@ func (r *Runtime) Setup(ctx context.Context, dataRoot, toolSource string, env [] } newEnv := runtimeEnv.AppendPath(env, venvBinPath) + if runtime.GOOS == "windows" && os.Getenv("PYTHONIOENCODING") == "" { + newEnv = append(newEnv, "PYTHONIOENCODING=utf-8") + } newEnv = append(newEnv, "VIRTUAL_ENV="+venvPath) if runtime.GOOS == "windows" {