code: def pathencode (path):
      
      if isinstance(path, unicode) and not os.path.supports_unicode_filenames:
          path = path.encode(FSCODING, "replace")
      return path
docs: Encode a path string with the platform file system encoding.