Menu

QR Capacity Is a Mode Problem Before It Is a Size Problem
📰

QR Capacity Is a Mode Problem Before It Is a Size Problem

DEV Community: javascript·WGG·12 days ago
#Ywtm4kdv
#devtojavascript#devto#dev#version#level
Reading 0:00
15s threshold

Most QR sizing arguments start with pixels. They should start with the encoder's mode choice, because the mode decides how many bits each character costs, and that decides which version the symbol needs.

The generator's status line makes the order visible. The same characters, at the same error correction level, can land on different versions.

Four modes, four prices

QR does not store text. The encoder splits the message into segments and picks a mode for each one (ISO/IEC 18004 §6.3.6 allows mode changes inside a single symbol):

Mode Alphabet Cost

Numeric 0 – 9 10 bits per 3 digits

Alphanumeric 0 – 9 , A – Z , space and $ % * + - . / : 11 bits per 2 characters

Byte any byte 8 bits per byte

Kanji JIS X 0208 characters 13 bits per character

The byte row is where most non-Latin text lands. A Chinese, Japanese or Korean character usually takes 3 bytes in UTF-8, and a character outside the Basic Multilingual Plane takes 4.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.