terminal-coding-system

terminal-coding-system is a built-in function in `C source code'.

(terminal-coding-system &optional TERMINAL)

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.