The Code128 (1981) is an alphanumeric barcode with a high information density . The basic structure of a Code128 symbol consists of a start character, the useful information, the check digit and the stop character. A white area (bright field or quiet zone) with a width of at least 10 modules must be kept clear in front of the start sign and behind the stop sign.
The Code 128 is fully described in the international standard ISO / IEC 15417.
The coding consists of a multi-width code with eleven modules for each symbol. Three bars and three spaces with a maximum width of four modules each form the code pattern for a symbol. The character structure is self-checking, since the number of modules shown as bars is always even, the number of space modules is uneven.
With Code128, three different start symbols define the valid character set and thus the meaning of a certain bar code pattern. The change of the character set within a reading symbol is controlled by context-dependent special function codes. These control characters are best viewed as punctuation marks that structure the information.
Permanent character set changes or temporary changes that only apply to a single subsequent character are defined. There are also special function codes that control the temporary storage of prefix codes or the identification of special application areas. It is also possible to combine several reading symbols that are read one after the other.
The alphabet of Code128 contains the assignment of 103 characters to the dedicated barcode patterns. There are also 3 different start characters and 1 stop character. The stop sign has a special position. It is made up of 13 modules with four lines and applies regardless of a character set selection. Since the Code128 (like other barcodes) encodes its information about the bar widths and bar positions, a precise code print is required in order to be able to read out the encoded information reliably.
There are three different character sets:
- Character set A contains digits, capital letters, special characters and ASCII control characters.
- Character set B contains digits and all upper and lower case letters, as well as special characters and shift characters.
- Specifically for numerical requirements, character set C assigns 100 value pairs from “00” to “99” to the barcode patterns (plus special character FNC1).
If a barcode contains several connected digits, it can be advantageous to switch to character set C in between in order to reduce the number of symbols required.
The test character is calculated from the weighted sum of the character values (table indices) as the remainder modulo 103 and inserted into the barcode immediately before the stop character. The code is different from older codes such as B. 2/5 not context-free, so the interpretation of a character is determined by the preceding characters.
Code128 is the basis of GS1-128 , which makes explicit use of the special properties of concatenation, character set change and prefix code. The GS1-128 used to be called EAN-128. When the organization behind it changed its name to GS1 (Global Standards ONE), the name was also changed to GS1-128. The special feature results from the structured code content for GS1 applications. The specifications for standardized data structures can be found in the international standard ISO / IEC 15418.