def get_filesystem_encoding():
 global _warned_about_filesystem_encoding
 rv = sys.getfilesystemencoding()
 if ((has_likely_buggy_unicode_filesystem and (not rv)) or _is_ascii_encoding(rv)):
  if (not _warned_about_filesystem_encoding):
   warnings.warn('Detected a misconfigured UNIX filesystem: Will use UTF-8 as filesystem encoding instead of {0!r}'.format(rv), BrokenFilesystemWarning)
   _warned_about_filesystem_encoding = True
  return 'utf-8'
 return rv

def get_filesystem_encoding ( ) : global _warned_about_filesystem_encoding rv = sys . getfilesystemencoding ( ) if ( ( has_likely_buggy_unicode_filesystem and ( not rv ) ) or _is_ascii_encoding ( rv ) ) : if ( not _warned_about_filesystem_encoding ) : warnings . warn ( 'Detected a misconfigured UNIX filesystem: Will use UTF-8 as filesystem encoding instead of {0!r}' . format ( rv ) , BrokenFilesystemWarning ) _warned_about_filesystem_encoding = True return 'utf-8' return rv
returns the filesystem encoding that should be used .