Chapter 7. Input format for entering special characters and accessing advanced features

Data matrix encoder accepts three parameters - the data encoded, the target size, and the line feed string. The target size is an integer representing one of 30 choices that a data matrix symbol can have, plus value 0 for automatic size selection. The line feed string is used to separate lines so you can parse the result into an array of strings, with each representing a barcode row.

The data encoded is a single-byte ASCIIZ string. The control character NULL (the first one in the ASCII table) is not allowed in an ASCIIZ string, because this peculiar character is reserved as the indicator of end of string (EOS) in C language. If you want to encode this character, you need to use the escaped format.

Escaping means using an alternative form (usually a combination of several readable characters) to enter the character instead. It is necessary since some characters are not normally acceptable due to the limitations imposed by the programs or transport protocols, such as control characters (ASCII value 0 - 31).

There are several advanced data matrix features which require special input. Because all character values, from 0 to 256 can be encoded into a data matrix symbol, the only way to enter them into the input parameter is through the escaped form. These features include Macro 5 and 6, ECI and Structural Append.

Note

If you are not encoding control characters, or not using any of the advanced features, you can skip this chapter all together.