def to_unicode_from_fs(string):
 if (not is_string(string)):
  string = to_text_string(string.toUtf8(), 'utf-8')
 elif is_binary_string(string):
  try:
   unic = string.decode(FS_ENCODING)
  except (UnicodeError, TypeError):
   pass
  else:
   return unic
 return string

def to_unicode_from_fs ( string ) : if ( not is_string ( string ) ) : string = to_text_string ( string . toUtf8 ( ) , 'utf-8' ) elif is_binary_string ( string ) : try : unic = string . decode ( FS_ENCODING ) except ( UnicodeError , TypeError ) : pass else : return unic return string
return a unicode version of string decoded using the file system encoding .