code: def transcode(text, input=PREFERRED_ENCODING, output=PREFERRED_ENCODING):
      
      try:
          return text.decode("cp437").encode("cp1252")
      except UnicodeError:
          try:
              return text.decode("cp437").encode(output)
          except UnicodeError:
              return text
docs: Transcode a text string