code: def decode_text(s):
      
      if s.startswith(b'\xfe\xff'):
          return unicode(s[2:], 'utf-16be', 'ignore')
      else:
          return ''.join(PDFDocEncoding[ord(c)] for c in s)
docs: Decodes a PDFDocEncoding string to Unicode.