About 61 results
Bokep
- Viewed 3k times1answered Mar 28, 2013 at 14:04
Looks like a bug in PyPDF2. In this section:
if string.startswith(codecs.BOM_UTF16_BE):retval = TextStringObject(string.decode("utf-16"))retval.autodetect_utf16 = Trueit assumes that any string starting with (0xFE, 0xFF) can be decoded as UTF-16. Your file contains a bytestring that begins that way but then contains invalid UTF-16.
The simplest fix is to comment out that if and unconditionally use the # This is probably a big performance hit here branch.
Content Under CC-BY-SA license python - pyPdf: illegal UTF-16 surrogate - Stack Overflow
Opening and reading UTF-16 files in Python - Stack Overflow
Python 'utf-16-le' Error when getting the columns from MS Access ...
python - Trouble decoding utf-16 string - Stack Overflow
UnicodeDecodeError: 'utf-16-le' codec can't decode byte 0x20 in ...
Understanding Unicode: Surrogate Blocks, Noncharacters
- People also ask
Why UTF-32 instead of UTF-16 if we have surrogate pairs?
How does UTF-16 encoding use surrogate code points?
python - Unable to read an xls (a password protected file) after ...
How was the position of the Surrogates Area (UTF-16) chosen?
java - Wrong bytes from UTF-16 encoding - Stack Overflow
python - UnicodeDecodeError: 'utf-16-le' - Stack Overflow
Python3 - 'utf-16-le' codec can't encode character '\\udce2' in ...
Why does JSON encode UTF-16 surrogate pairs instead of …
UTF-16 Encoding - Why using complex surrogate pairs?
db2 - UnicodeDecodeError: 'utf-16-le' codec can't decode bytes in ...
utf 16 - Unicode surrogates and combinig characters - Stack …
javascript and string manipulation w/ utf-16 surrogate pairs
'utf-16-le' codec can't decode bytes while reading EXCEL in …
UnicodeDecodeError: 'utf-16-le' codec can't decode bytes in …
utf 16 - Conversion of UTF16 to UTF32 - Invalid surrogate pair
pyODBC + unixodbc + Db2 for iSeries = UnicodeDecodeError, …
python - UnicodeDecodeError on byte type - Stack Overflow
Related searches for illegal utf 16 surrogate site:stackoverflow.com