Fix utils.decode_text

This issue seems to surface only with some PDFs.