Encoding
Although this is a free standard, there are no free documents that explain the encoding process. Documentation in PDF or paper format can be purchased from the ISO web site
The diagram below illustrates the placement of the message data within a Data Matrix symbol. The message is "Wikipedia", and it is arranged in a somewhat complicated diagonal pattern starting near the upper-left corner. Some characters are split in two pieces, such as the initial W. Also shown are the end-of-message code (marked End), the padding (P) and error correction (E) bytes, and four modules of unused space (X).
There are multiple encoding modes used to store different kinds of messages. The default mode stores one ASCII character per 8-bit codeword. Control codes are provided to switch between modes, as shown below.
Codeword | Interpretation |
---|---|
0 | Not used |
1 – 128 | ASCII data (ASCII value + 1) |
129 | End of message |
130 – 229 | Digit pairs 00 – 99 |
230 | Begin C40 encoding |
231 | Begin Base 256 encoding |
232 | FNC1 |
233 | Structured append. Allows a message to be split across multiple symbols. |
234 | Reader programming |
235 | Set high bit of the following character |
236 | 05 Macro |
237 | 06 Macro |
238 | Begin ANSI X12 encoding |
239 | Begin Text encoding |
240 | Begin EDIFACT encoding |
241 | Extended Channel Interpretation code |
242 – 255 | Not used |
Read more about this topic: Data Matrix