mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
414 stars 76 forks source link

non ascii characters #81

Open AntonMezger opened 3 years ago

AntonMezger commented 3 years ago

There is some problem with special characters. It seems that special characters like é, ö, è, ü, etc. are not represented in the qr-image.

heuer commented 3 years ago

A minimal code example would be helpful.

>>> import pyqrcode
>>> pyqrcode.create('é, ö, è, ü').png('test.png', scale=10)

Result test

At least ZXing is able to decode it

AntonMezger commented 3 years ago

Hi,

I downloaded PyQrCode-1.2.1

I toke your above example, it worked perfectly well when I scanned with QrBot on my Iphone. I had with the swiss PayEye scanner unknown characters. I will have to dig somewhere in.

Thanks

heuer commented 3 years ago

I see. Is PayEye somehow related to the European Payments Council Quick Response Codes (EPC QR Codes)?

The EPC QR Codes make special demands on the encoding.

heuer commented 3 years ago

Found it. PayEye is for reading Swiss QR Codes a variant of the EPC QR Codes.

If you're developing Swiss QR Code support with PyQRCode I recommend to switch to another lib, PyQRCode is not maintained anymore.

Shameless plug: Segno. ;) It supports EPC QR Codes (but no Swiss QR Codes): https://segno.readthedocs.io/en/latest/epc-qrcodes.html