Function: terminal-coding-system

Return coding system specified for terminal output on the given terminal.
TERMINAL may be a terminal object, a frame, or nil for the selected
frame's terminal device.

(fn &optional TERMINAL)