diff --git a/compat/mingw.c b/compat/mingw.c index 13fa2f14ae3037..40ac29eb8a07c1 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2913,6 +2913,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)