UnicodeEncodeError while reading image data
janmoppel opened this issue · comments
Jan Moppel commented
Env:
Windows 10, Python 3.9.
Issue:
Got the UnicodeEncodeError
while processing example tesseract image data with make run
.
UnicodeEncodeError: 'charmap' codec can't encode character '\xfc' in position 57: character maps to <undefined>
Solution:
Specify utf-8 encoding while reading the data.
out = open(output_file, "w", encoding='utf-8')
William commented
Does it work now?
Regards,
William
Jan Moppel commented
Yes, it's good now. Thank you.