def fix_unix_encoding(folder):
 if ((not sabnzbd.WIN32) and (not sabnzbd.DARWIN) and gUTF):
  for (root, dirs, files) in os.walk(folder.encode('utf-8')):
   for name in files:
    new_name = special_fixer(name).encode('utf-8')
    if (name != new_name):
     try:
      shutil.move(os.path.join(root, name), os.path.join(root, new_name))
     except:
      logging.info('Cannot correct name of %s', os.path.join(root, name))

def fix_unix_encoding ( folder ) : if ( ( not sabnzbd . WIN32 ) and ( not sabnzbd . DARWIN ) and gUTF ) : for ( root , dirs , files ) in os . walk ( folder . encode ( 'utf-8' ) ) : for name in files : new_name = special_fixer ( name ) . encode ( 'utf-8' ) if ( name != new_name ) : try : shutil . move ( os . path . join ( root , name ) , os . path . join ( root , new_name ) ) except : logging . info ( 'Cannot correct name of %s' , os . path . join ( root , name ) )
fix bad name encoding for unix systems .