Skip to content

Input Processing

Terry Burton edited this page Oct 12, 2026 · 25 revisions

Input Processing

parse

In supporting barcode symbologies, when the parse option is specified, any instances of ^NNN in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters.

Additionally, control character names can be used to specify equivalent ASCII values, as follows:

Sequence ASCII value
^NUL 0
^SOH 1
^STX 2
^ETX 3
^EOT 4
^ENQ 5
^ACK 6
^BEL 7
^BS 8
^TAB 9
^LF 10
^VT 11
^FF 12
^CR 13
^DLE 16
^DC1 17
^DC2 18
^DC3 19
^DC4 20
^NAK 21
^SYN 22
^ETB 23
^CAN 24
^EM 25
^SUB 26
^ESC 27
^FS 28
^GS 29
^RS 30
^US 31

ASCII control characters SO and SI cannot be encoded by name (since SO would prefix clash with SOH).

Note: When this option is enabled, literal instances of "^" in the data should be escaped as ^094 to avoid replacement if the subsequent data characters represent a valid substitution. For example, literal "^123" in the input data can be escaped as ^094123, literal "^RS" in the data can be escaped as ^094RS, and literal "^ABC" in the data can be escaped as ^094ABC (in case ^ABC becomes a valid substitution in the future).

Example

Equivalent symbols:

Data:    This is Data Matrix
Options: 
Encoder: datamatrix
Data:    This is ^068ata Matrix
Options: parse
Encoder: datamatrix

parsefnc

In supporting barcode symbologies, when the parsefnc option is specified, non-data function characters can be specified by escaped combinations such as ^FNC1, ^FNC@ (FNC1 in second position, see below), ^FNC4, ^SFT/ and ^ECI000003.

Note: When this option is enabled, literal instances of ^ in the input data can be escaped as ^^.

Example

Manually-composed Code 93 Extended demonstrating use of the special shift combination (/)A to represent !:

Data:    TERRY^SFT/A
Options: parsefnc includecheck
Encoder: code93

FNC1 in first position

FNC1 in first position, written ^FNC1 at the start of the data, denotes data in GS1 Application Identifier standard format. Elsewhere in the data ^FNC1 is a field separator.

The names first and second position come from Code 128, where FNC1 directly follows the Start character for GS1 data, or follows an AIM application indicator in a single symbol character for AIM data. Other symbologies use the names for these two declarations rather than for literal positions.

  • Recommendation: Consider the GS1 encoders, such as GS1-128, GS1 DataMatrix and GS1 QR Code, which take data in GS1 Application Identifier standard format and place every FNC1 automatically.
  • A further ^FNC1 in the data is a field separator.
  • ECIs are not available with FNC1 in first position.

Example

Code 128 with FNC1 in first position, and a further FNC1 separating a variable-length field:

Data:    ^FNC1010952123454321310ABC123^FNC121XYZ
Options: parsefnc includetext
Encoder: code128

FNC1 in second position

FNC1 in second position marks data that conforms to an industry format identified by an AIM application indicator: one letter or two digits at the start of the data. With the parsefnc option, write ^FNC@ at the start of the data followed by the AIM application indicator, e.g. ^FNC@T... or ^FNC@99..., and the encoder places the FNC1 where the symbology requires it. A reader transmits the AIM application indicator followed by the data, and reports FNC1 in second position in the symbology identifier, e.g. ]C2T... for Code 128.

Example

Code 128 with AIM application indicator T:

Data:    ^FNC@T12345^FNC1ABC
Options: parsefnc includetext
Encoder: code128

Clone this wiki locally