def UNTRANS(p):
 global gTABLE_LATIN_850
 if sabnzbd.WIN32:
  return p.encode('cp1252', 'replace').translate(gTABLE_LATIN_850)
 else:
  return p

def UNTRANS ( p ) : global gTABLE_LATIN_850 if sabnzbd . WIN32 : return p . encode ( 'cp1252' , 'replace' ) . translate ( gTABLE_LATIN_850 ) else : return p
for windows: translate pythons latin-1 to cp850 others: return original string .