Information technology -- Automatic identification and data capture techniques -- Code 128 bar code symbology specification

The technology of bar coding is based on the recognition of patterns encoded in bars and spaces of defined dimensions. There are numerous methods of encoding information in bar code form, known as symbologies. Code 128 is one such symbology. The rules defining the translation of characters into bar and space patterns, and other essential features of each symbology, are known as the symbology specification. In the past, symbology specifications were developed and published by a number of organizations, resulting in certain instances in conflicting requirements for certain symbologies. Manufacturers of bar code equipment and users of bar code technology require publicly available standard symbology specifications to which they can refer when developing equipment and software. ISO/IEC 15417:2007 specifies the requirements for the bar code symbology known as Code 128. It specifies Code 128 symbology characteristics, data character encodation, dimensions, decoding algorithms and the parameters to be defined by applications. It specifies the symbology identifier prefix strings for Code 128 symbols.

Technologies de l'information -- Techniques automatiques d'identification et de capture des données -- Spécifications des symbologies des codes à barres, code 128

General Information

Status
Published
Publication Date
30-May-2007
Current Stage
6060 - International Standard published
Start Date
07-May-2007
Completion Date
31-May-2007
Ref Project

RELATIONS

Buy Standard

Standard
ISO/IEC 15417:2007 - Information technology -- Automatic identification and data capture techniques -- Code 128 bar code symbology specification
English language
25 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (sample)

INTERNATIONAL ISO/IEC
STANDARD 15417
Second edition
2007-06-01
Information technology — Automatic
identification and data capture
techniques — Code 128 bar code
symbology specification —
Technologies de l'information — Techniques d'identification
automatique et de capture des données — Spécifications des
symbologies des codes à barres, code 128
Reference number
ISO/IEC 15417:2007(E)
ISO/IEC 2007
---------------------- Page: 1 ----------------------
ISO/IEC 15417:2007(E)
PDF disclaimer

This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but

shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In

downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat

accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.

Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation

parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In

the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.

COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2007

All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,

electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or

ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii © ISO/IEC 2007 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 15417:2007(E)
Contents Page

Foreword............................................................................................................................................................ iv

Introduction ........................................................................................................................................................ v

1 Scope ..................................................................................................................................................... 1

2 Normative references ........................................................................................................................... 1

3 Terms and definitions........................................................................................................................... 1

4 Requirements ........................................................................................................................................ 2

Annex A (normative) Additional features of Code 128................................................................................. 15

Annex B (normative) Special considerations relating to Function Code 1 (FNC1)................................... 16

Annex C (normative) Symbology identifiers ................................................................................................. 18

Annex D (informative) Relationship of symbol character value to ASCII value......................................... 19

Annex E (informative) Use of Start, Code Set and Shift characters to minimize symbol width............... 20

Annex F (informative) ISO/IEC 8859-1 (Latin Alphabet no. 1) character set............................................... 21

Annex G (informative) User-defined application parameters ...................................................................... 22

Annex H (informative) Guidelines for the use of Code 128.......................................................................... 23

Bibliography ..................................................................................................................................................... 25

© ISO/IEC 2007 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 15417:2007(E)
Foreword

ISO (the International Organization for Standardization) and IEC (the International Electrotechnical

Commission) form the specialized system for worldwide standardization. National bodies that are members of

ISO or IEC participate in the development of International Standards through technical committees

established by the respective organization to deal with particular fields of technical activity. ISO and IEC

technical committees collaborate in fields of mutual interest. Other international organizations, governmental

and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information

technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.

International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.

The main task of the joint technical committee is to prepare International Standards. Draft International

Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as

an International Standard requires approval by at least 75 % of the national bodies casting a vote.

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent

rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.

ISO/IEC 15417 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,

Subcommittee SC 31, Automatic identification and data capture techniques.

This second edition cancels and replaces the first edition (ISO/IEC 15417:2000), which has been technically

revised.
iv © ISO/IEC 2007 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC 15417:2007(E)
Introduction

The technology of bar coding is based on the recognition of patterns encoded in bars and spaces of defined

dimensions. There are numerous methods of encoding information in bar code form, known as symbologies.

Code 128 is one such symbology. The rules defining the translation of characters into bar and space patterns,

and other essential features of each symbology, are known as the symbology specification.

In the past, symbology specifications were developed and published by a number of organizations, resulting in

certain instances in conflicting requirements for certain symbologies.

Manufacturers of bar code equipment and users of bar code technology require publicly available standard

symbology specifications to which they can refer when developing equipment and software.

© ISO/IEC 2007 – All rights reserved v
---------------------- Page: 5 ----------------------
INTERNATIONAL STANDARD ISO/IEC 15417:2007(E)
Information technology — Automatic identification and data
capture techniques — Code 128 bar code symbology
specification
1 Scope

This International Standard specifies the requirements for the bar code symbology known as Code 128. It

specifies Code 128 symbology characteristics, data character encodation, dimensions, decoding algorithms

and the parameters to be defined by applications. It specifies the symbology identifier prefix strings for Code

128 symbols.
2 Normative references

The following referenced documents are indispensable for the application of this document. For dated

references, only the edition cited applies. For undated references, the latest edition of the referenced

document (including any amendments) applies.

ISO/IEC 646:1991, Information technology — ISO 7-bit coded character set for information interchange

ISO/IEC 8859-1, Information technology — 8-bit single-byte coded graphic character sets — Part 1: Latin

alphabet No. 1

ISO/IEC 15416, Information technology — Automatic identification and data capture techniques — Bar code

print quality test specification — Linear symbols

ISO/IEC 15424, Information technology — Automatic identification and data capture techniques — Data

Carrier Identifiers (including Symbology Identifiers)

ISO/IEC 19762-1, Information technology — Automatic identification and data capture (AIDC) techniques —

Harmonized vocabulary — Part 1: General terms relating to AIDC

ISO/IEC 19762-2, Information technology — Automatic identification and data capture (AIDC) techniques —

Harmonized vocabulary — Part 2: Optically readable media (ORM)
3 Terms and definitions

For the purposes of this document, the terms and definitions given in ISO/IEC 19762-1 and ISO/IEC 19762-2

apply.
© ISO/IEC 2007 – All rights reserved 1
---------------------- Page: 6 ----------------------
ISO/IEC 15417:2007(E)
4 Requirements
4.1 Symbology characteristics
The characteristics of Code 128 are as follows.
a) Encodable character set:

1) All 128 ISO/IEC 646 characters, i.e. characters 0 to 127 inclusive, in accordance with ISO/IEC 646.

NOTE This version consists of the G0 set of ISO/IEC 646 and the C0 set of ISO/IEC 6429 with values 28 – 31

modified to FS, GS, RS and US respectively.
2) Characters with byte values 128 to 255 may also be encoded.
3) 4 non-data function characters.
4) 4 code set selection characters.
5) 3 Start characters.
6) 1 Stop character.
b) Code type: Continuous.

c) Elements per symbol character: 6, comprising 3 bars and 3 spaces, each of 1, 2, 3 or 4 modules in width

(Stop character: 7 elements comprising 4 bars and 3 spaces).
d) Character self-checking: Yes.
e) Symbol length: Variable.
f) Bidirectionally decodable: Yes.
g) Symbol check character: One, mandatory (see A.1).

h) Data character density: 11 modules per symbol character (5,5 modules per numeric character).

i) Non-data overhead: Equivalent to 35 modules.
4.2 Symbol structure
Code 128 symbols shall comprise
a) a leading quiet zone,
b) a Start character,
c) one or more characters representing data and special characters,
d) a symbol check character,
e) a Stop character,
f) a trailing quiet zone.
Figure 1 illustrates a Code 128 symbol encoding the text “AIM”.
2 © ISO/IEC 2007 – All rights reserved
---------------------- Page: 7 ----------------------
ISO/IEC 15417:2007(E)

Quiet zone Start char. Data characters Symbol Stop char. Quiet Zone

check char.
AIM
Figure 1 — Code 128 symbol
4.3 Character encodation
4.3.1 Symbol character structure

Each symbol character comprises six elements (three bars and three spaces arranged alternately from left to

right, commencing with a bar), each of which is 1, 2, 3 or 4 modules wide, with a total width of 11 modules.

The sum of the bar modules in any symbol character is always even (even parity) and that of the space

modules is therefore always odd. This parity feature enables character self-checking to be carried out. The

Stop character comprises an additional bar element two modules wide making its total width 13 modules.

Each symbol character is assigned a numeric value listed in Table 1. This value is used in calculating the

symbol check character value. It may also be used to provide a conversion to and from ISO/IEC 646 values

(see Annex D). Table 1 defines all the Code 128 character assignments. In the column headed 'Element

Widths' the numeric values represent the widths of the elements in modules or multiples of the X dimension.

Figure 2 below illustrates Start character A.
1 2 3 4 5 6 7 8 9 10 11
4 2
2 1 1 1
Figure 2 — Code 128 Start character A

Figure 3 below illustrates the encodation of the symbol character value 35, which represents data character

‘C’ in Code Sets A or B or the two digits ‘35’ in Code Set C.
1 2 3 4 5 6 7 8 9 10 11
3 3 2
1 1 1
Figure 3 — Code 128 symbol character value 35
© ISO/IEC 2007 – All rights reserved 3
---------------------- Page: 8 ----------------------
ISO/IEC 15417:2007(E)
Figure 4 below illustrates the Stop character.
1 2 3 4 5 6 7 8 9 10 11 12 13
2 3 3 2
111
Figure 4 — Code 128 Stop character
4.3.2 Data character encodation

Code 128 has three unique data character code sets shown in Table 1 as Code Sets A, B, and C, each

comprising a subset of the ISO/IEC 646 IRV character set together with various auxiliary characters. The

symbol character bar and space patterns shown represent the data characters listed in the columns for Code

Set A, B, or C. The choice of code set depends on the Start character or, within the symbol, on the use of

Code A, Code B or Code C characters or the Shift character. If the symbol begins with Start character A, then

Code Set A is defined initially. Code Set B and Code Set C are similarly defined by beginning the symbol with

Start character B or C respectively. The code set can be redefined within the symbol by the use of Code A,

Code B, and Code C characters or the Shift character (see 4.3.4.1 for the use of these special characters).

The same data may be represented by different Code 128 symbols, through the use of different combinations

of Start, Code Set, and Shift characters. An application should not specify the code set to be used. Annex E

contains rules to minimize the length of the symbol for any given data. A decoder shall in addition decode

symbols which use valid combinations of Start, Code Set, and Shift characters and data other than that

derived from the application of the algorithm in Annex E, such as a symbol with a code set or Shift character

at the end of the data.
Table 1 — Code 128 character encodation
CODE ISO/IEC CODE ISO/IEC CODE ELEMENT ELEMENT
SYMBOL
SET 646 SET 646 SET WIDTHS PATTERN
CHAR.
A VALUE B VALUE C (modules)
VALUE
for Set for Set
A B
B S B S B S 1 2 3 4 5 6 7 8 9 10 11
0 space 32 space 32 00 212222
1 ! 33 ! 33 01 222122
2 " 34 " 34 02 222221
3 # 35 # 35 03 121223
4 $ 36 $ 36 04 121322
5 % 37 % 37 05 131222
6 & 38 & 38 06 122213
7 apos- 39 apos- 39 07 122312
trophe trophe
8 ( 40 ( 40 08 132212
9 ) 41 ) 41 09 221213
10 * 42 * 42 10 221312
11 + 43 + 43 11 231212
12 comma 44 comma 44 12 112232
13 - 45 - 45 13 122132
14 full 46 full stop 46 14 122231
stop
15 / 47 / 47 15 113222
4 © ISO/IEC 2007 – All rights reserved
---------------------- Page: 9 ----------------------
ISO/IEC 15417:2007(E)
CODE ISO/IEC CODE ISO/IEC CODE ELEMENT ELEMENT
SYMBOL
SET 646 SET 646 SET WIDTHS PATTERN
CHAR.
A VALUE B VALUE C (modules)
VALUE
for Set for Set
A B
B S B S B S 1 2 3 4 5 6 7 8 9 10 11
16 0 48 0 48 16 123122
17 1 49 1 49 17 123221
18 2 50 2 50 18 223211
19 3 51 3 51 19 221132
20 4 52 4 52 20 221231
21 5 53 5 53 21 213212
22 6 54 6 54 22 223112
23 7 55 7 55 23 312131
24 8 56 8 56 24 311222
25 9 57 9 57 25 321122
26 colon 58 colon 58 26 321221
27 semi- 59 semi- 59 27 312212
colon colon
28 < 60 < 60 28 322112
29 = 61 = 61 29 322211
30 > 62 > 62 30 212123
31 ? 63 ? 63 31 212321
32 @ 64 @ 64 32 232121
33 A 65 A 65 33 111323
34 B 66 B 66 34 131123
35 C 67 C 67 35 131321
36 D 68 D 68 36 112313
37 E 69 E 69 37 132113
38 F 70 F 70 38 132311
39 G 71 G 71 39 211313
40 H 72 H 72 40 231113
41 I 73 I 73 41 231311
42 J 74 J 74 42 112133
43 K 75 K 75 43 112331
44 L 76 L 76 44 132131
45 M 77 M 77 45 113123
46 N 78 N 78 46 113321
47 O 79 O 79 47 133121
48 P 80 P 80 48 313121
49 Q 81 Q 81 49 211331
50 R 82 R 82 50 231131
51 S 83 S 83 51 213113
52 T 84 T 84 52 213311
53 U 85 U 85 53 213131
54 V 86 V 86 54 311123
55 W 87 W 87 55 311321
56 X 88 X 88 56 331121
57 Y 89 Y 89 57 312113
58 Z 90 Z 90 58 312311
59 [ 91 [ 91 59 332111
© ISO/IEC 2007 – All rights reserved 5
---------------------- Page: 10 ----------------------
ISO/IEC 15417:2007(E)
CODE ISO/IEC CODE ISO/IEC CODE ELEMENT ELEMENT
SYMBOL
SET 646 SET 646 SET WIDTHS PATTERN
CHAR.
A VALUE B VALUE C (modules)
VALUE
for Set for Set
A B
B S B S B S 1 2 3 4 5 6 7 8 9 10 11
60 \ 92 \ 92 60 314111
61 ] 93 ] 93 61 221411
62 ^ 94 ^ 94 62 431111
63 _ 95 _ 95 63 111224
64 NUL 00 grave 96 64 111422
accent
65 SOH 01 a 97 65 121124
66 STX 02 b 98 66 121421
67 ETX 03 c 99 67 141122
68 EOT 04 d 100 68 141221
69 ENQ 05 e 101 69 112214
70 ACK 06 f 102 70 112412
71 BEL 07 g 103 71 122114
72 BS 08 h 104 72 122411
73 HT 09 i 105 73 142112
74 LF 10 j 106 74 142211
75 VT 11 k 107 75 241211
76 FF 12 l 108 76 221114
77 CR 13 m 109 77 413111
78 SO 14 n 110 78 241112
79 SI 15 o 111 79 134111
80 DLE 16 p 112 80 111242
81 DC1 17 q 113 81 121142
82 DC2 18 r 114 82 121241
83 DC3 19 s 115 83 114212
84 DC4 20 t 116 84 124112
85 NAK 21 u 117 85 124211
86 SYN 22 v 118 86 411212
87 ETB 23 w 119 87 421112
88 CAN 24 x 120 88 421211
89 EM 25 y 121 89 212141
90 SUB 26 z 122 90 214121
91 ESC 27 { 123 91 412121
92 FS 28 | 124 92 111143
93 GS 29 } 125 93 111341
94 RS 30 ~ 126 94 131141
95 US 31 DEL 127 95 114113
96 FNC3 FNC3 96 114311
97 FNC2 FNC2 97 411113
98 SHIFT SHIFT 98 411311
99 CODE CODE 99 113141
C C
100 CODE FNC4 CODE 1 1 413 1
B B
6 © ISO/IEC 2007 – All rights reserved
---------------------- Page: 11 ----------------------
ISO/IEC 15417:2007(E)
CODE ISO/IEC CODE ISO/IEC CODE ELEMENT ELEMENT
SYMBOL
SET 646 SET 646 SET WIDTHS PATTERN
CHAR.
A VALUE B VALUE C (modules)
VALUE
for Set for Set
A B
B S B S B S 1 2 3 4 5 6 7 8 9 10 11
101 FNC4 CODE CODE 311 1 4 1
A A
102 FNC1 FNC1 FNC1 411131
103 Start A 211412
104 Start B 211214
105 Start C 211232
SYMBOL CODE CODE CODE ELEMENT ELEMENT
CHAR. SET SET SET WIDTHS PATTERN
VALUE A B C (modules)
B S B S B S B 1 2 3 4 5 6 7 8 9 10 11 12 13
- Stop 2 3 3 1 1 1 2

NOTE The Stop character comprises 13 modules in four bars and three spaces. Every other character is 11 modules

wide, starts with a bar and ends with a space and comprises six elements, each of which varies from one to four modules

in width. The numeric values in the B and S columns represent the number of modules in each bar or space element

respectively in the symbol characters.
4.3.3 Code Sets
4.3.3.1 Code Set A

Code Set A includes all of the standard upper case alphanumeric characters and punctuation characters

together with the control characters, i.e. characters with values from 00 to 95 inclusive, as defined in

ISO/IEC 646, and seven special characters.
4.3.3.2 Code Set B

Code Set B includes all of the standard upper case alphanumeric characters and punctuation characters

together with the lower case alphabetic characters (i.e. characters with values from 32 to 127 inclusive, as

defined in ISO/IEC 646) and seven special characters.
4.3.3.3 Code Set C

Code Set C includes the set of 100 digit pairs from 00 to 99 inclusive, as well as three special characters.

This allows numeric data to be encoded as two data digits per symbol character.
4.3.4 Special characters

The last seven characters of Code Sets A and B (character values 96 - 102) and the last three characters of

Code Set C (character values 100 - 102) are special non-data characters with no ISO/IEC 646 character

equivalents, which have particular significance to the bar code reading device.
4.3.4.1 Code Set and shift characters

Code Set and Shift characters shall be used to change from one code set to another within a symbol. They

shall not be transmitted by the decoder.

a) Code Set characters — Code A, B or C characters change the symbol code set from the code set

defined previously to the new code set defined by the code character. This change applies to all

© ISO/IEC 2007 – All rights reserved 7
---------------------- Page: 12 ----------------------
ISO/IEC 15417:2007(E)

characters following the Code Set character until either the end of the symbol, another Code Set

character or the Shift character is encountered.

b) Shift character — The Shift character changes the code set from A to B or B to A for the single character

following the shift character. Characters following the affected character shall revert to the Code Set A or

B defined prior to the Shift character. The shifted symbol character shall not be a Code Set or Shift

character.
4.3.4.2 Function characters

Function Characters (FNC) define instructions to the bar code reading device to allow for special operations

and applications.
a) FNC1 shall be subject to the special considerations defined in Annex B.

b) FNC2 (Message Append) instructs the bar code reader to store temporarily the data from the symbol

containing the FNC2 character and transmit it as a prefix to the data of the next symbol. This may be

used to concatenate several symbols before transmission. This character may occur anywhere in the

symbol. Where the sequence of data is significant, provision should be made to ensure reading of the

symbols in the correct sequence.

c) FNC3 (Initialise) instructs the bar code reader to interpret the data from the symbol containing the FNC3

character as instructions for initialization or reprogramming of the bar code reader. The data from the

symbol shall not be transmitted by the bar code reader. This character may occur anywhere in the

symbol.

d) FNC4 is used to represent an extended character set (byte values 128 to 255) as specified in

ISO/IEC 8859-1 or otherwise in an application specification. If a single FNC4 character is used, the value

128 is added to the ISO/IEC 646 value of the following data character in the symbol. A Shift character

may follow the FNC4 character if it is necessary to change code set for the following data character.

Subsequent data characters revert to the standard ISO/IEC 646 set. If two consecutive FNC4 characters

are used, the value 128 is added to the ISO/IEC 646 value of all following data characters until two further

consecutive FNC4 characters are encountered or the end of the symbol is reached. If during this

sequence of extended encodation a single FNC4 character is encountered it is used to revert to standard

ISO/IEC 646 encodation for the next data character only. Shift and code set characters shall have their

normal effect during such a sequence. The default reference character set for extended values 128 - 255

is the corresponding half of ISO/IEC 8859-1, Latin Alphabet 1, as shown in Annex F, but application

specifications may define or reference alternative sets corresponding to byte values 128 to 255.

4.3.4.3 Start and Stop characters

Start characters A, B and C define the corresponding code set to be used initially in the symbol.

The Stop character is common to all code sets.
Start and Stop characters shall not be transmitted by the decoder.
4.3.5 Symbol check character

The symbol check character shall be included as the last symbol character before the Stop character. The

algorithm for its calculation is defined in A.1. The symbol check character shall not be represented in the

human readable interpretation, nor shall it be transmitted by the decoder.
8 © ISO/IEC 2007 – All rights reserved
---------------------- Page: 13 ----------------------
ISO/IEC 15417:2007(E)
4.4 Dimensions
4.4.1 Nominal module width (X)

The width of a module should be defined by the application specification, having due regard to the availability

of equipment for the production and reading of symbols and complying with the general requirements of the

application. See 4.7.1.
The X dimension shall be constant throughout a given symbol.
4.4.2 Quiet zone

Minimum width of the quiet zone (to the left and right of the Code 128 symbol): 10X

4.4.3 Symbol width

The width, W (in millimetres), of a Code 128 symbol, including quiet zones, can be calculated from the

following expression:
WC=+11()2+ 2X+ 2Q
where
W is the symbol width;
C is the number of symbol characters (including symbol check character );
X is the width of a narrow element in millimetres;
Q is the width of the quiet zone in millimetres.

NOTE It is necessary to apply the rules in Annex E, or another algorithm, to determine the number of symbol

characters before this expression can be evaluated.
4.5 Reference decode algorithm

Bar code reading systems are designed to read imperfect symbols to the extent that practical algorithms

permit. This section describes the reference decode algorithm used in the computation of the decodability

value described in ISO/IEC 15416.
The algorithm contains the following steps to decode each bar coded character.

1. Calculate eight width measurements p, e , e , e , e , b , b , and b (Figure 5).

1 2 3 4 1 2 3
Figure 5 — Decode measurements
© ISO/IEC 2007 – All rights reserved 9
---------------------- Page: 14 ----------------------
ISO/IEC 15417:2007(E)

2. Convert measurements e , e , e , and e to normalized values E , E , E , and E which will represent

1 2 3 4 1 2 3 4

the integral module width (E ) of these measurements. The following method is used for the i-th value.

If 1,5p / 11 ≤ e < 2,5p / 11, then E = 2.
i i
If 2,5p / 11 ≤ e < 3,5p / 11, then E = 3.
i i
If 3,5p / 11 ≤ e < 4,5p / 11, then E = 4.
i i
If 4,5p / 11 ≤ e < 5,5p / 11, then E = 5.
i i
If 5,5p / 11 ≤ e < 6,5p / 11, then E = 6.
i i
If 6,5p / 11 ≤ e < 7,5p / 11, then E = 7.
i i
Otherwise the character is in error.

3. Look up character in decode table using the four values E , E , E , and E as the key. (See Table 2.)

1 2 3 4

4. Retrieve character self-checking value V which is stored in the table with the character. The value V

is equal to the sum of the modules for the bars as defined for that character.
5. Verify that
Vp−+1, 75 V 1, 75p
( ) ( )
<+bb+b<
12 3
11 11
Otherwise the character is in error.

The calculation indirectly uses character parity to detect all decode errors caused by single non-

systematic one-module edge errors.

Using these five steps, decode the first character. If it is a Start character, continue decoding the symbol in the

normal forward direction. If it is not a Start character but decodes as a Stop character, attempt to decode all

subsequent characters in the reverse direction.

After all characters have been decoded, make sure there is a valid Start character, a valid Stop character, and

that the symbol check character is correct.

Translate the symbol characters into the appropriate data characters from Code Set A, B, or C according to

the Start character, code characters, and shift characters used in the symbol.

In addition, perform such other secondary checks on quiet zones, beam acceleration, absolute timing,

dimensions, etc., as are deemed prudent and appropriate considering the specific reading device and

intended application environment.

NOTE In this algorithm the symbol is decoded using "edge to similar edge" measurements (e), plus an additional

measurement of the sum of the three bar widths.
Table 2 — Edge differences for decoding Code 128
Char. value E E E E V Char. value E E E E V
1 2 3 4 1 2 3 4
00 3 34 4 6 54 4223 6
01 4 43 3 6 55 4245 6
02 4 44 4 6 56 6423 6
03 3 33 4 4 57 4332 6
04 3 34 5 4 58 4354 6
05 4 43 4 4 59 6532 6
10 © ISO/IEC 2007 – All rights reserved
---------------------- Page: 15 ----------------------
ISO/IEC 15417:2007(E)
Char. value E E E E V Char. value E E E E V
1 2 3 4 1 2 3 4
06 3 4 4 3 4 60 4 5 5 2 8
07 3 4 5 4 4 61 4 3 5 5 4
08 4 5 4 3 4 62 7 4 2 2 6
09 4 3 3 3 4 63 2 2 3 4 4
10 4 3 4 4 4 64 2 2 5 6 4
11 5 4 3 3 4 65 3 3 2 3 4
12 2 3 4 5 6 66 3 3 5 6 4
13 3 4 3 4 6 67 5 5 2 3 4
14 3 4 4 5 6 68 5 5 3 4 4
15 2 4 5 4 6 69 2 3 4 3 4
16 3 5 4 3 6 70 2 3 6 5 4
17 3 5 5 4 6 71 3 4 3 2 4
18 4 5 5 3 6 72 3 4 6 5 4
19 4 3 2 4 6 73 5 6 3 2 4
20 4 3 3 5 6 74 5 6 4 3 4
21 3 4 5 3 6 75 6 5 3 3 4
22 4 5 4 2 6 76 4 3 2 2 4
23 4 3 3 4 8 77 5 4 4 2 8
24 4 2 3 4 6 78 6 5 2 2 4
25 5 3 2 3 6 79 4 7 5 2 6
26 5 3 3 4 6 80 2 2 3 6 6
27 4 3 4 3 6 81 3 3 2 5 6
28 5 4 3 2 6 82 3 3 3 6 6
29 5 4 4 3 6 83 2 5 6 3 6
30 3 3 3 3 6 84 3 6 5 2 6
31 3 3 5 5 6 85 3 6 6 3 6
32 5 5 3 3 6 86 5 2 3 3 6
33 2 2 4 5 4 87 6 3 2 2 6
34 4 4 2 3 4 88 6 3 3 3 6
35 4 4 4 5 4 89 3 3 3 5 8
36 2 3 5 4 4 90 3 5 5 3 8
37 4 5 3 2 4 91 5 3 3 3 8
38 4 5 5 4 4 92 2 2 2 5 6
39 3 2 4 4 4 93 2 2 4 7 6
40 5 4 2 2 4 94 4 4 2 5 6
41 5 4 4 4 4 95 2 5 5 2 6
42 2 3 3 4 6 96 2 5 7 4 6
43 2 3 5 6 6 97 5 2 2 2 6
44 4 5 3 4 6 98 5 2 4 4 6
45 2 4 4 3 6 99 2 4 4 5 8
46 2 4 6 5 6 100 2 5 5 4 8
47 4 6 4 3 6 101 4 2 2 5 8
48 4 4 4 3 8 102 5 2 2 4 8
49 3 2 4 6 6 103 3 2 5 5 4
50 5 4 2 4 6 104 3 2 3 3 4
51 3 4 4 2 6 105 3 2 3 5 6
52 3 4 6 4 6 Stop 5 6 4 2 6
53 3 4 4 4 8 Stop 3 2 2 4 6

NOTE Stop values are for decoding in forward direction. Stop values apply to the first six elements of the Stop

A B
character s
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.