252
Chapter 11 Data Formats of Barcode Types
Code 128
Syntax
Data Structure
ASCII DC4 n ... n DC4
hex. 14 n ... n 14
dec. 20 n ... n 20
Description
While many barcode styles are limited to numbers, Code 128 can encode
numbers, letters, and other symbols commonly found on ke yboards, such as
@, # and %. The Code 128 barcode is similar to three barcodes in one. The
three barcode styles are called Code A, Code B, and Code C. Each ba rcode
style is designed to encode certain types of data in the most c ompact way.
Code A encodes uppercase alpha, numeric and control cod es.
Code B encodes upper and lower case alpha and numeric codes .
Code C encodes digits in pairs.
A single Code 128 barcode may consist of all three Code 128 bar code styles
A, B and C. The printer chooses the styles which resul t in the most compact
Code 128 barcode for the data to be encoded. Do not be concerned about
choosing the correct barcode styles as this is done auto matically.
The ">" (greater than) symbol is a special character prefix . If a character with
decimal value less then 32 needs to be encoded (i.e., a cont rol character),
then send a ">" followed by the character that is decimal 64 hig her then the
control code character.
NOTE: Control characters conflict with DC4, SUB. These characters are
encoded by using the ">" sign following a number that is 64 dec.
higher than the control character.
Figures/Characters (n) Start Code Stop Code
ASCII
Tab le 45 on page 253.
None None
hex.
dec.