Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty data creates a Micro QR Code in byte mode #18

Closed
heuer opened this issue Sep 1, 2016 · 2 comments
Closed

Empty data creates a Micro QR Code in byte mode #18

heuer opened this issue Sep 1, 2016 · 2 comments
Labels
Milestone

Comments

@heuer
Copy link
Owner

heuer commented Sep 1, 2016

>>> import segno
>>> qr = segno.make('')
>>> qr.version
'M3'
>>> qr.mode
'byte'

Shouldn't we expect version "M1" in "alphanumeric" mode?

@heuer heuer added the question label Sep 1, 2016
@heuer
Copy link
Owner Author

heuer commented Sep 1, 2016

Take care:

>>> import segno
>>> qr1 = segno.make('')
>>> qr2 = qr.make(0)
>>> qr1.martrix == qr2.matrix
False
>>> qr1.version == qr2.version
True
>>> qr1.error is qr2.error
True
>>> qr1.mode != qr2.mode
True

@heuer
Copy link
Owner Author

heuer commented Sep 1, 2016

Byte mode seems to be correct:

[...] Alphanumeric mode encodes data from a set of 45 characters, i.e. 10 numeric digits (0 - 9) (byte values
30HEX to 39HEX), 26 alphabetic characters (A - Z) (byte values 41HEX to 5AHEX) , and 9 symbols (SP, $, %,
*, +, -, ., /, :) (byte values 20HEX, 24HEX, 25HEX, 2AHEX, 2BHEX, 2D to 2FHEX, 3AHEX respectively). [...]

@heuer heuer added this to the 0.1.7 milestone Sep 1, 2016
heuer added a commit that referenced this issue Sep 1, 2016
@heuer heuer closed this as completed in f622293 Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant