From bfb1282e0066be9c1049128f27e400f72cbc840b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis?= Date: Sat, 21 Dec 2024 04:20:24 +0000 Subject: [PATCH] Fix Unicode $USER (#2278) * Fix Unicode $USER When `$USER` contains Unicode then cmd.exe will return `%AppData%` in Windows Code Page which won't be recognized by Linux/grep. So make sure it outputs result in UTF-8 instead. --- src/winetricks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winetricks b/src/winetricks index 99fcdaa9c..5c37219a2 100755 --- a/src/winetricks +++ b/src/winetricks @@ -1054,7 +1054,7 @@ w_pathconv() # Expand an environment variable and print it to stdout w_expand_env() { - winetricks_early_wine_arch cmd.exe /c echo "%$1%" + winetricks_early_wine_arch cmd.exe /c "chcp 65001 > nul && echo %$1%" } # Determine what architecture a binary file is built for, silently continue in case of failure.