X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3bf369928e44fd83c27ef436b05d9cd2b4abbfba..f2fbd4b71236ca5559b93eb2baf1a7671442eef9:/src/emacs.c diff --git a/src/emacs.c b/src/emacs.c index d318fd4649..70db900246 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2152,6 +2152,13 @@ synchronize_locale (int category, Lisp_Object *plocale, Lisp_Object desired_loca { if (! EQ (*plocale, desired_locale)) { +#ifdef WINDOWSNT + /* Changing categories like LC_TIME usually requires to specify + an encoding suitable for the new locale, but MS-Windows's + 'setlocale' will only switch the encoding when LC_ALL is + specified. So we ignore CATEGORY and use LC_ALL instead. */ + category = LC_ALL; +#endif *plocale = desired_locale; setlocale (category, (STRINGP (desired_locale) ? SSDATA (desired_locale)