Code 128
From Wikipedia, the free encyclopedia
Code 128 is a very high-density barcode symbology, used extensively world wide in shipping and packaging industries. GS1-128 (formerly known as UCC/EAN-128) is one of its variants. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and is also capable of encoding two numbers into one character width, called double density. This feature is evidence of it being designed to reduce the amount of space the bar code occupies, to address the ever-increasing needs of item catalogs. Each printed character can have one of three different meanings, depending on which of three different character sets are employed. Code 128 is the major component of the labeling standard for GS1-128 (formerly known as UCC/EAN-128), used as product identification for container and pallet levels of retail markets.
[edit] Specification
A Code 128 barcode will have six sections:
- Quiet Zone
- Start Character
- Encoded Data
- Check Character
- Stop Character
- Quiet Zone
The check character is calculated from a modulo 103 calculation of the weighted sum of all the characters.
-
- Subtypes
Code 128 barcodes may be generated specifically as 128A, 128B, 128C. It is possible to change between each subtype at anytime within a barcode.
- 128A - 0-9, A-Z, ASCII control codes, special characters
- 128B - 0-9, A-Z, a-z, special characters
- 128C - 00-99 (double density encoding of numeric only data)
-
- Quiet Zone
The quiet zone should be at least ten times the width of the narrowest bar/space element.
-
- Start/Stop and Encoded Data
Each character in the barcode symbol is composed of three bars and three spaces. (The stop character has four bars and three spaces as the final symbol will always have a final (extra) bar.)
-
- Check Digit Calculation
The check digit is a Modulus 103 checksum. It is calculated by summing the start code 'value' to the products of each character's 'value' multiplied by its position in the barcode string. The left most character is position 1. The sum of the start code value and the products is divided by 103. The remainder is the check digits 'value'.