Code 128 is an increased density 1D barcode that can encode all standard (ASCII) characters, both letters and numbers. It also provides an extension character (FNC4) to encode some national symbols. The checksum digit helps to detect errors also when the individual symbols in the message appear to be correct.
The Code 128 label can be as long as necessary to store the encoded data, while its actual length should be limited by the scanner capabilities. It can be scanned both right to left and left to right. Human readable information, if any, must not overlap with the barcode area.
A Code 128 barcode will have six sections:
The quiet zone is at least ten times the width of the narrowest bar/space element.The check character is a weighted sum (modulo 103) of all the characters.
Code 128 includes 103 data symbols, 3 start codes, and 1 stop code. To represent all 128 ASCII values, there are three code sets ( A, B, C) that can be mixed within a single barcode. The codes 103, 104, 105 are used to switch between these code sets:
Each character in the barcode symbol contains three bars and three spaces and is terminated by the additional extra bar of length 2 (the stop mark). Each bar or space is 1, 2, 3 or 4 units wide. The sum of the widths of bars must be even and the sum of the widths of the spaces must be odd. Each data character is made of 11 black or white modules, except the stop character that is made of 13 modules.
Code 128 specifies a combination of 6 bars and spaces for each character. Each character begins with a bar and ends with a space. The exception of these two rules is the Stop chracter that uses 7 bars and spaces and ends in a bar. The width of each bar or space can be 1, 2, 3 or 4 units.
This web page reuses material from Wikipedia page http://en.wikipedia.org/wiki/Code_128 under the rights of CC-BY-SA license. As a result, the content of this page is and will stay available under the rights of this license regardless of restrictions that apply to other pages of this website.