ID EN
OS

device_encoding

Python 3.11

Return a string describing the encoding of the device associated with fd if it is connected to a terminal; else return None.

Syntax

PYTHON
os.device_encoding(fd)

See Also

None Python UTF-8 Mode