Skip to content

Commit

Permalink
Fix Unicode $USER (#2278)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
davispuh authored Dec 21, 2024
1 parent cede504 commit bfb1282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/winetricks
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bfb1282

Please sign in to comment.