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()
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?
You should use sys.getdefaultencoding()