-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PdfReadError: Illegal character in Name Object #369
Copy link
Copy link
Closed
Description
try:
return NameObject(name.decode('utf-8'))
except (UnicodeEncodeError, UnicodeDecodeError) as e:
# Name objects should represent irregular characters
# with a '#' followed by the symbol's hex number
if not pdf.strict:
warnings.warn("Illegal character in Name Object", utils.PdfReadWarning)
return NameObject(name)
else:
# raise utils.PdfReadError("Illegal character in Name Object")
return NameObject(name)str can't decode('utf-8') in Python3.
Therefore, I modify code above and it worked.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels