changeset 100351:d23b1588c7c1

Move decoding of locale info from Lisp to C. * src/w32proc.c (Fw32_get_locale_info): Decode long form of locale name. * lisp/w32-fns.el (w32-list-locales): Revert part of 2008-10-17 change; decoding of long locale info is now done in `w32-get-locale-info'.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 11 Dec 2008 09:40:44 +0000
parents d698608b3a92
children 6c39d6f94891
files lisp/ChangeLog lisp/w32-fns.el src/ChangeLog src/w32proc.c
diffstat 4 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 11 08:46:35 2008 +0000
+++ b/lisp/ChangeLog	Thu Dec 11 09:40:44 2008 +0000
@@ -1,3 +1,8 @@
+2008-12-11  Juanma Barranquero  <lekktu@gmail.com>
+
+	* w32-fns.el (w32-list-locales): Revert part of 2008-10-17 change;
+	decoding of long locale info is now done in `w32-get-locale-info'.
+
 2008-12-11  Chong Yidong  <cyd@stupidchicken.com>
 
 	* progmodes/ruby-mode.el: Fix auto-mode-alist entry.
--- a/lisp/w32-fns.el	Thu Dec 11 08:46:35 2008 +0000
+++ b/lisp/w32-fns.el	Thu Dec 11 09:40:44 2008 +0000
@@ -221,15 +221,11 @@
     (setq w32-valid-locales (sort (w32-get-valid-locale-ids) #'<)))
   (with-output-to-temp-buffer "*Supported Locales*"
     (princ "LCID\tAbbrev\tFull name\n\n")
-    (princ (decode-coding-string (mapconcat
-				  (lambda (x)
-				    (format "%d\t%s\t%s"
-					    x
-					    (w32-get-locale-info x)
-					    (w32-get-locale-info x t)))
-				  w32-valid-locales "\n")
-				 locale-coding-system))
-    (princ "\n")))
+    (dolist (locale w32-valid-locales)
+      (princ (format "%d\t%s\t%s\n"
+		     locale
+		     (w32-get-locale-info locale)
+		     (w32-get-locale-info locale t))))))
 
 ;;; Setup Info-default-directory-list to include the info directory
 ;;; near where Emacs executable was installed.  We used to set INFOPATH,
--- a/src/ChangeLog	Thu Dec 11 08:46:35 2008 +0000
+++ b/src/ChangeLog	Thu Dec 11 09:40:44 2008 +0000
@@ -1,3 +1,7 @@
+2008-12-11  Juanma Barranquero  <lekktu@gmail.com>
+
+	* w32proc.c (Fw32_get_locale_info): Decode long form of locale name.
+
 2008-12-11  Juanma Barranquero  <lekktu@gmail.com>
 
 	* process.c (Fsystem_process_attributes, syms_of_process):
--- a/src/w32proc.c	Thu Dec 11 08:46:35 2008 +0000
+++ b/src/w32proc.c	Thu Dec 11 09:40:44 2008 +0000
@@ -1983,7 +1983,7 @@
 				LOCALE_SLANGUAGE | LOCALE_USE_CP_ACP,
 				full_name, sizeof (full_name));
       if (got_full)
-	return build_string (full_name);
+	return DECODE_SYSTEM (build_string (full_name));
     }
   else if (NUMBERP (longform))
     {