diff --git a/pdfminer/utils.py b/pdfminer/utils.py index 56b2d647..653bc90d 100644 --- a/pdfminer/utils.py +++ b/pdfminer/utils.py @@ -213,7 +213,7 @@ def nunpack(b, default=0): )) def decode_text(s): """Decodes a PDFDocEncoding string to Unicode.""" - if s.startswith('\xfe\xff'): + if s.startswith(b'\xfe\xff'): return str(s[2:], 'utf-16be', 'ignore') else: return ''.join( PDFDocEncoding[ord(c)] for c in s )