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

Creating QR Codes with Multiple Data Modes #118

Closed
eaydin opened this issue Dec 20, 2022 · 2 comments
Closed

Creating QR Codes with Multiple Data Modes #118

eaydin opened this issue Dec 20, 2022 · 2 comments

Comments

@eaydin
Copy link

eaydin commented Dec 20, 2022

I have a QR Code that I'd like to re-generate. It is decoded using standard libraries and easily read, but regenerating it seems not possible with various tools, including with segno.

The data consists of alphanumeric characters, yet is also has one non-alphanumeric character, which implies it should be a Byte, but it is version 1 and the error correction is of type M. And under these circumstances, one cannot fit the data into the QR Code.

Goofing around with http://qrlogo.kaarposoft.dk/index.html shows that while decoding, the decoders actually switch between 3 different data modes, alphanumeric, byte, numeric respectively.

It first switches to alphanumeric mode, reads 8 bytes, then switches to byte mode, reads 1 byte, and then switches to numeric mode, and reads the rest of it. This way data is easily fit into a smaller QR.

Reading the API, I've failed to find a way to switch between modes midway in the data, since I can only feed one mode and one set of data. Is it possible somehow?

@heuer
Copy link
Owner

heuer commented Dec 21, 2022

Thanks for your msg.

It is possible but not well documented or not documented at all.

See issue #76 for details.

@eaydin
Copy link
Author

eaydin commented Dec 21, 2022

Thanks, I've managed to do it with the examples discussed in that issue. Closing this one to avoid confusion.
Thanks again for the help.

@eaydin eaydin closed this as completed Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants