Tilde codes always start with the ASCII character tilde ~ (character value 126). The corresponding key on a standard PC keyboard sits at the top left corner, just under ESC key.
In previous versions, the DataMatrix Fontware encodes control characters through a black slash followed by 3-digit ASCII decimal value of the character. For example, line feed (ASCII value 10) can be entered by its escaped form “\010”. This method is still supported. However, we discourage the use of this method, because tilde codes format provides better support on control characters as well as data matrix specific characters.
Although many vendors support it, the tilde codes are not public standards. We have not seen any endorsement by standards organizations. It does not appear in the data matrix standard either.
Starting from version 3.30, Morovia DataMatrix Fontware
supports the following tilde codes:
- ~dnnn
When nnn corresponds to a numeric value between 0 and 255, the tilde code sequence represents a character with value equal to nnn. For example, ~d032 represents a space character.
- ~~
Represents a tilde (~) character.
- ~1
Represents a FNC1 character. The tilde escape sequence can appear anywhere in the input.
- ~2
Indicates that a structural append control block follows. See structural append topic for details.
- ~3
Represents a symbol character which means that message followed is used for reader programming. This escape sequence must appear at the beginning of the input.
- ~5
Represents a symbol character which encodes Macro 5 abbreviation. Must appear at the beginning of the message.
- ~6
Represents a symbol character which encodes Macro 6 abbreviation. Must appear at the beginning of the input.
- ~7
Indicates the start of an ECI block. This escape sequence must be followed by exact 6 digits, which corresponds to the ECI value.
- ~X
Represents a character value from 0 to 26. Replace the X like in the following example: ~@=means character ASCII 0, ~A means character ASCII 1, ~B means character 2, ~C means character ASCII 3 and so on. The most used symbols are ~I for a tab and ~M which represents a carriage return.