Function: set-terminal-coding-system
set-terminal-coding-system is an interactive and byte-compiled
function defined in mule.el.gz.
Signature
(set-terminal-coding-system CODING-SYSTEM &optional TERMINAL)
Documentation
Set coding system of terminal output to CODING-SYSTEM.
All text output to TERMINAL will be encoded with the specified coding system.
For a list of possible values of CODING-SYSTEM, use M-x list-coding-systems (list-coding-systems).
The default is determined by the selected language environment
or by the previous use of this command.
TERMINAL may be a terminal object, a frame, or nil for the selected frame's terminal. The setting has no effect on graphical terminals.
Probably introduced at or before Emacs version 20.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/international/mule.el.gz
(defun set-terminal-coding-system (coding-system &optional terminal)
"Set coding system of terminal output to CODING-SYSTEM.
All text output to TERMINAL will be encoded
with the specified coding system.
For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems].
The default is determined by the selected language environment
or by the previous use of this command.
TERMINAL may be a terminal object, a frame, or nil for the
selected frame's terminal. The setting has no effect on
graphical terminals."
(interactive
(list (let ((default (if (and (not (terminal-coding-system))
default-terminal-coding-system)
default-terminal-coding-system)))
(read-coding-system
(format-prompt "Coding system for terminal display" default)
default))))
(if (and (not coding-system)
(not (terminal-coding-system)))
(setq coding-system default-terminal-coding-system))
(if coding-system
(setq default-terminal-coding-system coding-system))
(set-terminal-coding-system-internal coding-system terminal)
(redraw-frame))