diff --git a/compat/mingw.c b/compat/mingw.c index dcdb3e5bc9..4713369cd1 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2930,6 +2930,9 @@ static void setup_windows_environment(void) */ if (!(tmp = getenv("MSYS")) || !strstr(tmp, "winsymlinks:nativestrict")) has_symlinks = 0; + + 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)