Expand description
Encoder for Code128 barcodes.
Code128 is a popular, high-density symbology that allows for the encoding of alphanumeric data along with many special characters by utilising three separate character-sets.
Code128 also offers double-density encoding of digits.
§Character sets
Barcoders provides special Unicode syntax for specifying the character set(s) which should be used in the barcode:
- \u{00C0} = Switch to character-set A (À)
- \u{0181} = Switch to character-set B (Ɓ)
- \u{0106} = Switch to character-set C (Ć)
You must provide both the starting character-set along with any changes during the data. This means all Code128 barcodes must start with either “À”, “Ɓ” or “Ć”. Simple alphanumeric data can generally use character-set A solely.
As an example, this barcode uses character-set B:
- \u{0181}HE1234A*1
Or:
- ƁHE1234A*1
And this one starts at character-set A (the default) and then switches to C to encode the digits more effectively:
- \u{00C0}HE@$A\u{0106}123456
Or:
- ÀHE@$AĆ123456
§Unicode characters
The invisible unicode characters that are available in character set A should be represented as their Unicode sequences. For example, to represent the ‘ACK’ character:
- À\u{0006}
§Special-purpose function characters (FNC1 - 4)
The function sequences can be represented via the following unicode characters:
- FNC1:
Ź
(\u{0179}
) - FNC2:
ź
(\u{017A}
) - FNC3:
Ż
(\u{017B}
) - FNC4:
ż
(\u{017C}
) - SHIFT:
Ž
(\u{017D}
)
Structs§
- Code128
- The Code128 barcode type.