aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/international/mule-cmds.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index c8cd76f5eb1..474806d204e 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2688,14 +2688,22 @@ See also `locale-charset-language-names', `locale-language-names',
2688 2688
2689 ;; On Windows, override locale-coding-system, 2689 ;; On Windows, override locale-coding-system,
2690 ;; default-file-name-coding-system, keyboard-coding-system, 2690 ;; default-file-name-coding-system, keyboard-coding-system,
2691 ;; terminal-coding-system with system codepage. 2691 ;; terminal-coding-system with the ANSI or console codepage.
2692 (when (and (eq system-type 'windows-nt) 2692 (when (and (eq system-type 'windows-nt)
2693 (boundp 'w32-ansi-code-page)) 2693 (boundp 'w32-ansi-code-page))
2694 (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page)))) 2694 (let* ((code-page-coding
2695 (intern (format "cp%d" (if noninteractive
2696 (w32-get-console-codepage)
2697 w32-ansi-code-page))))
2698 (output-coding
2699 (if noninteractive
2700 (intern (format "cp%d" (w32-get-console-output-codepage)))
2701 code-page-coding)))
2695 (when (coding-system-p code-page-coding) 2702 (when (coding-system-p code-page-coding)
2703 (or output-coding (setq output-coding code-page-coding))
2696 (unless frame (setq locale-coding-system code-page-coding)) 2704 (unless frame (setq locale-coding-system code-page-coding))
2697 (set-keyboard-coding-system code-page-coding frame) 2705 (set-keyboard-coding-system code-page-coding frame)
2698 (set-terminal-coding-system code-page-coding frame) 2706 (set-terminal-coding-system output-coding frame)
2699 (setq default-file-name-coding-system code-page-coding)))) 2707 (setq default-file-name-coding-system code-page-coding))))
2700 2708
2701 (when (eq system-type 'darwin) 2709 (when (eq system-type 'darwin)