Closed goretkin closed 8 years ago
Your right, it should have autodetected. I will investigate and get back to you.
Thanks for the report
I believe I fixed the issue.
When I added support for unicode and kanji, the numeric encoding function developed a problem. Since the QR code is encoded using bytes now, the iterator was converting it to an integer, i.e. the character's ordinal value, behind the scenes. Literally, bytes went in and integers came out. When I was using string types this did not happen. The fix was simple, if the digit is an integer (i.e. the digit character's ordinal), convert it back to a character.
I wrote some tests to confirm that version 1 is contents and size detection is working appropriately. They can be found in tests/test_issue38.py file. The first test case is the error you reported.
Would you pull from the main repo and check that it now functions for your purposes?
Once again, thanks for the bug report.
Ahh, so the original code does fit in a version-1 code? That makes sense.
The numeric codes are also now working! I thought perhaps there was an issue with my QR reader.
Thank you so much for the speedy response.
Great. I will push the update to pypi tonight.
Thanks for the report.
If I understand correctly,
create
should find the smallest QR code that can contain the data.produces
This works great: