Estimate the minimum QR version and capacity level from character count and encoding mode (numeric, alphanumeric, byte).
结果为粗略估算,实际需根据编码规范确定。
| Item | Formula / Rule | Source / Standard |
|---|---|---|
| Module count | Side length in modules = 17 + 4 × (v − 1) for v from 1 to 40 | ISO/IEC 18004:2015 §7.1 Symbol structure |
| Error correction | Levels L / M / Q / H recover roughly 7% / 15% / 25% / 30% of codewords | ISO/IEC 18004:2015 §7.5 Error correction characteristics |
| Capacity conversion | Capacity = total codewords − error-correction codewords − format and version bits | ISO/IEC 18004:2015 Annex A Capacity tables |
规划二维码印刷内容时确定所需版本与容量,例如产品包装、名片、海报与票务上的二维码;在容量受限时权衡编码模式(数字/字母/字节/汉字)与纠错等级,避免内容超出版本上限导致生成失败。