diff --git a/compat/mingw.c b/compat/mingw.c index 3e9332e8e2..465245bb27 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2493,6 +2493,9 @@ static void setup_windows_environment(void) if (!tmp && (tmp = getenv("USERPROFILE"))) setenv("HOME", tmp, 1); } + + if (!getenv("LC_ALL") && !getenv("LC_CTYPE") && !getenv("LANG")) + setenv("LC_CTYPE", "C", 1); } int handle_long_path(wchar_t *path, int len, int max_path, int expand)