changeset 55465:9629ef26c137

(set-locale-environment): On MS-Windows use ansi code-page for default coding-systems. Set up paper sizes for Windows 3 letter languages.
author Jason Rumney <jasonr@gnu.org>
date Sun, 09 May 2004 14:56:40 +0000
parents 5fb7af7d17e8
children cab56dc43f41
files lisp/international/mule-cmds.el
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Sun May 09 13:45:14 2004 +0000
+++ b/lisp/international/mule-cmds.el	Sun May 09 14:56:40 2004 +0000
@@ -2413,6 +2413,16 @@
 	  (prefer-coding-system coding-system)
 	  (setq locale-coding-system coding-system))))
 
+    ;; On Windows, override locale-coding-system, keyboard-coding-system,
+    ;; selection-coding-system with system codepage.
+    (when (boundp w32-ansi-code-page)
+      (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page))))
+	(when (coding-system-p code-page-coding)
+	  (setq locale-coding-system code-page-coding)
+	  (set-selection-coding-system code-page-coding)
+	  (set-keyboard-coding-system code-page-coding)
+	  (set-terminal-coding-system code-page-coding))))
+
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (let ((locale locale)
@@ -2435,7 +2445,11 @@
 						("posix$" . letter)
 						(".._us" . letter)
 						(".._pr" . letter)
-						(".._ca" . letter)))
+						(".._ca" . letter)
+						("enu$" . letter) ; Windows
+						("esu$" . letter)
+						("enc$" . letter)
+						("frc$" . letter)))
 		    'a4))))))
   nil)