# HG changeset patch # User Juanma Barranquero # Date 1224241894 0 # Node ID eeef1de115b342fb5034341f2452deaf37d1236a # Parent 1e2edab1fd4bd8b1149617b7975dd91a5ef6667c * w32-fns.el (w32-list-locales): Decode output of `w32-get-locale-info' according to `locale-coding-system'. (This fixes trivial bug reported as part of bug#1179). Sort list of valid locale ids (EnumSystemLocales does not guarantee any particular order). Use `when'. diff -r 1e2edab1fd4b -r eeef1de115b3 lisp/ChangeLog --- a/lisp/ChangeLog Fri Oct 17 02:44:36 2008 +0000 +++ b/lisp/ChangeLog Fri Oct 17 11:11:34 2008 +0000 @@ -1,3 +1,11 @@ +2008-10-17 Juanma Barranquero + + * w32-fns.el (w32-list-locales): Decode output of `w32-get-locale-info' + according to `locale-coding-system'. (This fixes trivial bug reported + as part of bug#1179). + Sort list of valid locale ids (EnumSystemLocales does not guarantee any + particular order). Use `when'. + 2008-10-16 Juanma Barranquero * w32-fns.el (w32-check-shell-configuration): Doc fix. diff -r 1e2edab1fd4b -r eeef1de115b3 lisp/w32-fns.el --- a/lisp/w32-fns.el Fri Oct 17 02:44:36 2008 +0000 +++ b/lisp/w32-fns.el Fri Oct 17 11:11:34 2008 +0000 @@ -217,18 +217,19 @@ (defun w32-list-locales () "List the name and id of all locales supported by Windows." (interactive) - (if (null w32-valid-locales) - (setq w32-valid-locales (w32-get-valid-locale-ids))) + (when (null w32-valid-locales) + (setq w32-valid-locales (sort (w32-get-valid-locale-ids) #'<))) (switch-to-buffer-other-window (get-buffer-create "*Supported Locales*")) (erase-buffer) (insert "LCID\tAbbrev\tFull name\n\n") - (insert (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")) + (insert (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)) (insert "\n") (goto-char (point-min)))