Next: , Previous: Explicit Encoding, Up: Coding Systems

33.9.8 Terminal I/O Encoding

Emacs can decode keyboard input using a coding system, and encode terminal output. This is useful for terminals that transmit or display text using a particular encoding such as Latin-1. Emacs does not set last-coding-system-used for encoding or decoding of terminal I/O.

— Function: keyboard-coding-system &optional terminal

This function returns the coding system that is in use for decoding keyboard input from terminal—or nil if no coding system is to be used for that terminal. If terminal is omitted or nil, it means the selected frame's terminal. See Multiple Terminals.

— Command: set-keyboard-coding-system coding-system &optional terminal

This command specifies coding-system as the coding system to use for decoding keyboard input from terminal. If coding-system is nil, that means do not decode keyboard input. If terminal is a frame, it means that frame's terminal; if it is nil, that means the currently selected frame's terminal. See Multiple Terminals.

— Function: terminal-coding-system &optional terminal

This function returns the coding system that is in use for encoding terminal output from terminal—or nil if the output is not encoded. If terminal is a frame, it means that frame's terminal; if it is nil, that means the currently selected frame's terminal.

— Command: set-terminal-coding-system coding-system &optional terminal

This command specifies coding-system as the coding system to use for encoding terminal output from terminal. If coding-system is nil, terminal output is not encoded. If terminal is a frame, it means that frame's terminal; if it is nil, that means the currently selected frame's terminal.