Reputation: 30356
I've seen in several places on the web (e.g. here and here and here) a table showing the number of characters each type of QR Code (1 to 40) can display depending on character type and EC level.
What I haven't been able to find or work out is the formula used to generate this table?
i.e. QR_Type & EC_Level & Character_Type => Max character length
I want to use this formula to work out the lowest QR type that can be used to display an input string, given a chosen EC level and by detecting the character set and string length.
Upvotes: 4
Views: 5662
Reputation: 66886
There is no formula for it. While it follows a general trend of course which you could approximate with a simple linear function, the exact cutoffs vary a bit due to roundings in several aspects -- number of codewords in a version, number of interleaves blocks, number of EC/data blocks. If you need an exact answer you need a table.
Upvotes: 4