diff options
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/emacs.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bdec3c9cde1..5aa248e91b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-03-21 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * emacs.c (synchronize_locale) [WINDOWSNT]: Ignore 'category' and | ||
| 4 | always use LC_ALL instead. Fixes problems with setting | ||
| 5 | system-time-locale to something non-default. | ||
| 6 | |||
| 1 | 2015-03-18 Glenn Morris <rgm@gnu.org> | 7 | 2015-03-18 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is | 9 | * frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is |
diff --git a/src/emacs.c b/src/emacs.c index d318fd4649a..70db900246a 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -2152,6 +2152,13 @@ synchronize_locale (int category, Lisp_Object *plocale, Lisp_Object desired_loca | |||
| 2152 | { | 2152 | { |
| 2153 | if (! EQ (*plocale, desired_locale)) | 2153 | if (! EQ (*plocale, desired_locale)) |
| 2154 | { | 2154 | { |
| 2155 | #ifdef WINDOWSNT | ||
| 2156 | /* Changing categories like LC_TIME usually requires to specify | ||
| 2157 | an encoding suitable for the new locale, but MS-Windows's | ||
| 2158 | 'setlocale' will only switch the encoding when LC_ALL is | ||
| 2159 | specified. So we ignore CATEGORY and use LC_ALL instead. */ | ||
| 2160 | category = LC_ALL; | ||
| 2161 | #endif | ||
| 2155 | *plocale = desired_locale; | 2162 | *plocale = desired_locale; |
| 2156 | setlocale (category, (STRINGP (desired_locale) | 2163 | setlocale (category, (STRINGP (desired_locale) |
| 2157 | ? SSDATA (desired_locale) | 2164 | ? SSDATA (desired_locale) |