mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
MS-Windows followup for batch stdout/stderr output changes
* lisp/international/mule-cmds.el (set-locale-environment): In batch mode, use console codepages for keyboard and terminal encoding. (Bug#20545)
This commit is contained in:
parent
d0848f8dde
commit
40b33be830
1 changed files with 11 additions and 3 deletions
|
|
@ -2688,14 +2688,22 @@ See also `locale-charset-language-names', `locale-language-names',
|
|||
|
||||
;; On Windows, override locale-coding-system,
|
||||
;; default-file-name-coding-system, keyboard-coding-system,
|
||||
;; terminal-coding-system with system codepage.
|
||||
;; terminal-coding-system with the ANSI or console codepage.
|
||||
(when (and (eq system-type 'windows-nt)
|
||||
(boundp 'w32-ansi-code-page))
|
||||
(let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page))))
|
||||
(let* ((code-page-coding
|
||||
(intern (format "cp%d" (if noninteractive
|
||||
(w32-get-console-codepage)
|
||||
w32-ansi-code-page))))
|
||||
(output-coding
|
||||
(if noninteractive
|
||||
(intern (format "cp%d" (w32-get-console-output-codepage)))
|
||||
code-page-coding)))
|
||||
(when (coding-system-p code-page-coding)
|
||||
(or output-coding (setq output-coding code-page-coding))
|
||||
(unless frame (setq locale-coding-system code-page-coding))
|
||||
(set-keyboard-coding-system code-page-coding frame)
|
||||
(set-terminal-coding-system code-page-coding frame)
|
||||
(set-terminal-coding-system output-coding frame)
|
||||
(setq default-file-name-coding-system code-page-coding))))
|
||||
|
||||
(when (eq system-type 'darwin)
|
||||
|
|
|
|||
Loading…
Reference in a new issue