diff --git a/compat/mingw.c b/compat/mingw.c index 8ee0b6408e..a46a8af8c9 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2592,6 +2592,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 is_valid_win32_path(const char *path, int allow_literal_nul)