What ECI does
ECI tells the reader which character set or data interpretation applies to the bytes that follow. Without it, the reader has to assume a default or guess from the bytes themselves.
ECI is not unique to QR codes. The scheme is defined by AIM, the barcode industry association, and is also supported by Data Matrix, Aztec code, PDF417, MaxiCode and other symbologies.
How it is encoded in a QR code
An ECI segment starts with the mode indicator 0111, followed by an ECI designator number of one to three bytes. The interpretation stays in effect until the end of the data or until another ECI changes it.
- ECI 3: ISO-8859-1 (Latin-1)
- ECI 20: Shift JIS
- ECI 26: UTF-8
- Designators range from 0 to 999999
Support in practice
Support for ECI is uneven. Industrial and document scanners often honor it, while many phone camera apps ignore it and detect UTF-8 by inspection, which works for most modern content.
Some older readers do not expect an ECI header and may show stray characters or fail to parse the content. For everyday URLs and plain text, most generators leave ECI out and rely on UTF-8 detection.