hudora / huBarcode

huBarcode is a Python Library to generate 1D and 2D Barcodes
http://github.com/mdornseif/huBarcode
146 stars 83 forks source link

Invalid QR-Codes generated #8

Open mdornseif opened 13 years ago

mdornseif commented 13 years ago

hongshan liu writes:

hi,Maximillian Dornseif, I was using your huBarcode,but I found some bugs when I using it.

bug example2:

-- coding: utf-8 --

# author: liu hongshan email: hongshan.liu@gmail.com
from hubarcode.qrcode import QRCodeEncoder
if **name** == "**main**":
    test = "TEL:13516190008" #i found when len(test)==15,the result image could not be decoded!
    ENCODER = QRCodeEncoder(test)
    ENCODER.save( "test.png",3)

could you fix these? thank you!

Estartu commented 13 years ago

I have a similar problem with 0.62. I try to encode URLs the resulting codes can only be read if the length of the URL is dividable by 4.

For example http://www.augusta.de/schulungen/computerbasics/20100820120955 produce a readable code. http://www.augusta.de/schulungen/computerbasics/201008201209550 doesn't

add 3 more 0 and it works again

Estartu commented 13 years ago

there are URL that have a length dividable by 4 which don't result in a readable code. http://estartu.dev.mytum.de:9380/schulungen/css/20101220111158// results in an unreadable code.

mdornseif commented 12 years ago

Anybody with a patch for this?