def getfilesystemencoding():
 encoding = sys.getfilesystemencoding()
 if (encoding is None):
  encoding = PREFERRED_ENCODING
 return encoding

def getfilesystemencoding ( ) : encoding = sys . getfilesystemencoding ( ) if ( encoding is None ) : encoding = PREFERRED_ENCODING return encoding
query the filesystem for the encoding used to encode filenames and environment variables .