Module barcoders::sym::code128 [] [src]

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.

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

Structs

Code128

The Code128 barcode type.