79305832

Date: 2024-12-24 14:37:37
Score: 1
Natty:
Report link

I know this is an old post but @maglub suggest an edit to an open MR related to this bug.

https://github.com/NaturalHistoryMuseum/pyzbar/pull/82#issuecomment-2060723050

try:
  # try to correct the encoding
  return res[0].data.decode('utf-8').encode('big5').decode('utf-8')
except:
  # if it fails, the encoding should already be good
  return res[0].data.decode('utf-8')

This workaround may helps. All credits goes to maglub (see the original solution on github)

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @maglub
  • Low reputation (0.5):
Posted by: ollie314