Skip to content

Error decode UTF-8 character 'â' #155

Description

@tamtr1997

I have a problem when I try using pyzbar to decode a QR image. But I had given result don't match data which I using qrcode make before.
this is my code:

from pyzbar.pyzbar import decode
from PIL import Image
from pyzbar.pyzbar import ZBarSymbol
import qrcode
image_path = "my_image.png"
data = 'â'
print(f'data = {data}')
img = qrcode.make(data)
img.save(image_path)
result = decode(Image.open(image_path),symbols=[ZBarSymbol.QRCODE])[0].data.decode("utf-8")
print(f"result = {result}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions