diff --git a/compat/mingw.c b/compat/mingw.c index 63f36c893bfe96..7d3d83e1ea90b0 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2821,6 +2821,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.UTF-8", 1); } static PSID get_current_user_sid(void)