fix encoding issues on formatted OCR text