[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ad80180: Fix problems with setting system-time-loca
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master ad80180: Fix problems with setting system-time-locale on MS-Windows |
Date: |
Sat, 21 Mar 2015 15:45:03 +0000 |
branch: master
commit ad80180d0f2fc2ea422cf7ca5bdcc636c0600744
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix problems with setting system-time-locale on MS-Windows
src/emacs.c (synchronize_locale) [WINDOWSNT]: Ignore 'category' and
always use LC_ALL instead. Fixes problems with setting
system-time-locale to something non-default.
---
src/ChangeLog | 6 ++++++
src/emacs.c | 7 +++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index bdec3c9..5aa248e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-21 Eli Zaretskii <address@hidden>
+
+ * emacs.c (synchronize_locale) [WINDOWSNT]: Ignore 'category' and
+ always use LC_ALL instead. Fixes problems with setting
+ system-time-locale to something non-default.
+
2015-03-18 Glenn Morris <address@hidden>
* 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 d318fd4..70db900 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ad80180: Fix problems with setting system-time-locale on MS-Windows,
Eli Zaretskii <=