Appendix B. How to Calculate Parity Value in Structural Append

The structural append feature in QR Code allows data encoded in multiple symbols (up to 16). In addition to the split data, each symbol prepends three additional fields: the sequence number, total number of symbols and the parity. The parity is calculated against the full data, and the scanner checks the parity to see if the symbols are encoded correctly after all symbols in the group are read.

Warning

If you did not specify the parity value, the encoder uses a fixed value. Some scanners do not perform parity check while some do. If parity value is not specified, you should disable the parity check in the scanner.

You can call Font Encoder DLL function QRCodeGetParity or Crystal UFL function QRCodeGetParity to calculate the parity value. Note that the input must the full text string encoded, not the one for a particular symbol. You can also use Parity Calculation Dialog to calculate the parity value.

Section 7.3 of ISO/IEC 18004 explains how to calucate the parity data:

The Parity Data shall be an 8-bit byte following the Symbol Sequence Indicator. The parity data is a value obtained by XORing byte by byte the byte values of all the original input data before division into symbol blocks. Mode Indicators, Character Count Identifiers, padding bits, Terminator and Pad Characters shall be excluded from the calculation. Input data is represented for this calculation by 2-byte Shift JIS values for Kanji (each byte being treated separately in the XOR calculation, most significant first) and 8-bit values as shown in Table 6 for other characters. In ECI mode the byte values obtained after any encryption or compression of the data shall be used for the calculation.