Skip to content
Advertisement

How do you find out what the “system default encoding” is?

The documentation for fileobject.encoding mentions that it can be None, and in that case, the “system default encoding” is used.

How can I find out what this encoding is?

Advertisement

Answer

You should use sys.getdefaultencoding()

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement