You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readStringFromStream() decodes (\376\377 ) to a string '\xfe\xff\x20'.
createStringObject() checks first 2 bytes of the string,
and will attempt to decode with UTF-16.
Then an exception will be raised because '\x20' is illegal as UTF-16.
Apparently, a text "\376\377" should not be treated as BOM.
BOM check would be a conformance of "Text Strings" described in PDF Reference,
but it should be applied only to the "text string" type item specified in PDF Reference.
The text was updated successfully, but these errors were encountered:
readStringFromStream() fails to create a string object
if a text object like below was given.
BT 1 0 0 1 0 1.9 Tm /F3+0 8.6 Tf 10.5 TL (\376\377 ) Tj T* ET
readStringFromStream() decodes (\376\377 ) to a string '\xfe\xff\x20'.
createStringObject() checks first 2 bytes of the string,
and will attempt to decode with UTF-16.
Then an exception will be raised because '\x20' is illegal as UTF-16.
Apparently, a text "\376\377" should not be treated as BOM.
BOM check would be a conformance of "Text Strings" described in PDF Reference,
but it should be applied only to the "text string" type item specified in PDF Reference.
The text was updated successfully, but these errors were encountered: