ISO/IEC 16022:2024
(Main)Information technology — Automatic identification and data capture techniques — Data Matrix bar code symbology specification
Information technology — Automatic identification and data capture techniques — Data Matrix bar code symbology specification
This document defines the requirements for the symbology known as Data Matrix. It specifies the Data Matrix symbology characteristics, data character encodation, symbol formats, dimensions and print quality requirements, error correction rules, decoding algorithm, and user-selectable application parameters. It applies to all Data Matrix symbols produced by any printing or marking technology.
Technologies de l'information — Techniques automatiques d'identification et de capture des données — Spécification de symbologie de code à barres Data Matrix
General Information
Relations
Standards Content (Sample)
International
Standard
ISO/IEC 16022
Third edition
Information technology —
2024-05
Automatic identification and data
capture techniques — Data Matrix
bar code symbology specification
Technologies de l'information — Techniques automatiques
d'identification et de capture des données — Spécification de
symbologie de code à barres Data Matrix
Reference number
© ISO/IEC 2024
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
© ISO/IEC 2024 – All rights reserved
ii
Contents Page
Foreword .v
Introduction .vi
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Symbols . 2
5 Mathematical or logical notations . 2
6 Symbol description. 2
6.1 Basic characteristics .2
6.2 Summary of additional features .3
6.3 Symbol structure .3
6.3.1 General .3
6.3.2 Finder pattern .4
6.3.3 Symbol sizes and capacities .4
7 Data Matrix code requirements. 4
7.1 Encode procedure overview . .4
7.1.1 General .4
7.1.2 Step 1: data encodation .4
7.1.3 Step 2: error checking and correcting codeword generation .4
7.1.4 Step 3: module placement in matrix.5
7.2 Data encodation .5
7.2.1 Overview .5
7.2.2 Default character interpretation .5
7.2.3 ASCII encodation .5
7.2.4 Symbology control characters .6
7.2.5 C40 encodation .7
7.2.6 Text encodation .9
7.2.7 ANSI X12 encodation .9
7.2.8 EDIFACT encodation .10
7.2.9 Base 256 encodation .11
7.3 ECI .11
7.3.1 General .11
7.3.2 Encoding ECIs . . 12
7.3.3 ECIs and Structured Append . 12
7.3.4 Post-decode protocol . 12
7.4 Data Matrix symbol attributes . 13
7.4.1 Symbol sizes and capacity . 13
7.4.2 Insertion of Alignment Patterns into larger symbols .14
7.5 Structured Append .14
7.5.1 Basic principles .14
7.5.2 Symbol sequence indicator .14
7.5.3 File identification . 15
7.5.4 FNC1 and Structured Append . 15
7.5.5 Buffered and unbuffered operation . 15
7.6 Error detection and correction . . 15
7.6.1 Reed-Solomon error correction . 15
7.6.2 Generating the error correction codewords . 15
7.6.3 Error correction capacity .16
7.7 Symbol construction .17
7.7.1 General .17
7.7.2 Symbol character placement .17
7.7.3 Alignment Pattern module placement .17
© ISO/IEC 2024 – All rights reserved
iii
7.7.4 Finder Pattern module placement .18
8 Symbol dimensions .18
9 Symbol quality .18
9.1 General .18
9.2 Symbol quality parameters .18
9.2.1 Fixed pattern damage .18
9.2.2 Overall symbol grade .18
9.2.3 Decode .18
9.2.4 Grid non-uniformity .18
9.3 Process control measurements .19
10 Reference decode algorithm for Data Matrix . 19
11 User guidelines .30
11.1 Human readable interpretation . 30
11.2 Autodiscrimination capability . 30
11.3 System considerations . 30
12 Transmitted data .30
12.1 General . 30
12.2 Protocol for FNC1 . 30
12.3 Protocol for FNC1 in the second position . 30
12.4 Protocol for Macro characters in the first position .31
12.5 Protocol for ECIs .31
12.6 Symbology identifier .31
12.7 Transmitted data example .31
Annex A (normative) Data Matrix interleaving process .33
Annex B (normative) Data Matrix pattern randomising .37
Annex C (normative) Data Matrix encodation character sets .39
Annex D (normative) Data Matrix alignment patterns .42
Annex E (normative) Data Matrix Reed-Solomon error detection and correction .44
Annex F (normative) Symbol character placement .48
Annex G (normative) Data Matrix print quality – symbology-specific aspects .64
Annex H (normative) Symbology identifier .75
Annex I (informative) Encode example . 76
Annex J (informative) Encoding data using the minimum symbol data characters .79
Annex K (informative) Autodiscrimination capability .83
Annex L (informative) System considerations .84
Annex M (informative) User considerations .85
Bibliography .86
© ISO/IEC 2024 – All rights reserved
iv
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.
The procedures used to develop this document and those intended for its further maintenance are described
in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types
of documents should be noted. This document was drafted in accordance with the editorial rules of the ISO/
IEC Directives, Part 2 (see www.iso.org/directives or www.iec.ch/members_experts/refdocs).
ISO and IEC draw attention to the possibility that the implementation of this document may involve the
use of (a) patent(s). ISO and IEC take no position concerning the evidence, validity or applicability of any
claimed patent rights in respect thereof. As of the date of publication of this document, ISO and IEC had not
received notice of (a) patent(s) which may be required to implement this document. However, implementers
are cautioned that this may not represent the latest information, which may be obtained from the patent
database available at www.iso.org/patents and https://patents.iec.ch. ISO and IEC shall not be held
responsible for identifying any or all such patent rights.
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions
related to conformity assessment, as well as information about ISO's adherence to the World Trade
Organization (WTO) principles in the Technical Barriers to Trade (TBT) see www.iso.org/iso/foreword.html.
In the IEC, see www.iec.ch/understanding-standards.
This document was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 31, Automatic identification and data capture techniques.
This third edition cancels and replaces the second edition (ISO/IEC 16022:2006), which has been technically
revised.
The main changes are as follows:
— the extended channel interpretations and rectangular formats have become a mandatory feature;
— the historic data matrix variant "ECC 000" to "ECC 140" has been removed;
— continuous grading according to ISO/IEC 15415 has been introduced to all quality measurements;
— transition ratio grading has been changed;
— new quality parameter “print growth” has been added;
— the reference decode algorithm has been revised;
— the interleaving blocks for 144 x 144 matrix size have been clarified.
Any feedback or questions on this document should be directed to the user’s national standards
body. A complete listing of these bodies can be found at www.iso.org/members.html and
www.iec.ch/national-committees.
© ISO/IEC 2024 – All rights reserved
v
Introduction
Data Matrix is a two-dimensional matrix symbology which is made up of nominally square modules
arranged within a perimeter finder pattern. Though primarily shown and described in this document as a
dark symbol on light background, Data Matrix symbols can also be printed to appear as light on dark.
Manufacturers of bar code equipment and users of the technology need publicly available standard
symbology specifications to which they can refer when developing equipment and application standards.
The publication of standardised symbology specifications is designed to achieve this.
© ISO/IEC 2024 – All rights reserved
vi
International Standard ISO/IEC 16022:2024(en)
Information technology — Automatic identification and
data capture techniques — Data Matrix bar code symbology
specification
1 Scope
This document defines the requirements for the symbology known as Data Matrix. It specifies the Data
Matrix symbology characteristics, data character encodation, symbol formats, dimensions and print quality
requirements, error correction rules, decoding algorithm, and user-selectable application parameters.
It applies to all Data Matrix symbols produced by any printing or marking technology.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes
requirements 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 19762, Information technology — Automatic identification and data capture (AIDC) techniques —
Harmonized vocabulary
ISO/IEC 15415, Information technology — Automatic identification and data capture techniques — Bar code
symbol print quality test specification — Two-dimensional symbols
ISO/IEC 646, 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 29158, Information technology — Automatic identification and data capture techniques — Direct Part
Mark (DPM) Quality Guideline
3 Terms and definitions
For the purposes of this document, the terms and definitions given in ISO/IEC 19762 and the following apply.
ISO and IEC maintain terminology databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https:// www .iso .org/ obp
— IEC Electropedia: available at https:// www .electropedia .org/
3.1
codeword
symbol character value
intermediate level of coding between source data and the graphical encodation in the symbol
3.2
module
single cell of element in a matrix symbology symbol used to encode one bit of the codeword (3.1)
[SOURCE: ISO/IEC 19762:2016, 04.02.06]
© ISO/IEC 2024 – All rights reserved
3.3
pattern randomising
procedure to convert an original bit pattern to another bit pattern by inverting selected bits
Note 1 to entry: The resulting bitstream is less likely to have repeating patterns.
4 Symbols
e number of erasures
k total number of error correction codewords
n total number of data codewords
N numerical base in an encodation scheme
p number of codewords reserved for error detection
S symbol character
t number of errors
X horizontal and vertical width of a module
ε error correction codeword
5 Mathematical or logical notations
div integer division operator
mod integer remainder after division
XOR exclusive-or logic function whose output is one only when its two inputs are not equivalent
6 Symbol description
6.1 Basic characteristics
Data Matrix is a two-dimensional matrix symbology.
The characteristics of Data Matrix are:
a) Encodable character set:
1) values 0 – 127 in accordance with ISO/IEC 646 IRV, i.e. all 128 ASCII characters;
2) values 128 - 255 in accordance with ISO/IEC 8859-1 (these are referred to as extended ASCII);
3) additional characters can be encoded using the ECI capabilities.
b) Representation of data: A dark module is a binary one and a light module is a zero.
This document specifies Data Matrix symbols in terms of dark modules marked on a light background.
However, 6.2 provides that symbols can also be produced with the module's colours reversed. In such
symbols, dark modules would be a binary zero, and light modules would be a binary one.
c) Symbol size in modules (not including quiet zone) ranging from 10 x 10 to 144 x 144 square and
rectangular versions ranging from 8 x 18 to 16 x 48 (see Table 10).
NOTE Additional rectangular symbol sizes are defined in ISO/IEC 21471 (see Reference [4]).
© ISO/IEC 2024 – All rights reserved
d) Data characters per symbol (for maximum symbol size):
1) Alphanumeric data: up to 2 335 characters
2) 8-bit byte data: 1 555 characters
3) Numeric data: 3 116 digits.
e) Code type: Matrix
f) Orientation independence: Yes
g) Error detection and correction: Reed Solomon.
6.2 Summary of additional features
The following summarises additional features which are inherent or optional in Data Matrix:
a) Reflectance reversal: (inherent): Symbols are either dark on light or light on dark (see Figure 1). The
specifications in this document are based on dark images on a light background, therefore references to
dark or light modules should be taken as references to light or dark modules respectively in the case of
symbols produced with reflectance reversal.
b) Extended Channel Interpretations: (ECI), (inherent): This mechanism enables characters from other
character sets (e.g. Arabic, Cyrillic, Greek, Hebrew) and other data interpretations or industry-specific
requirements to be represented.
c) Rectangular symbols: (inherent): Six symbol formats are specified in a rectangular form.
NOTE Additional rectangular symbol formats are available by ISO/IEC 21471 (see Reference [4]).
d) Structured append: (optional): This allows files of data to be represented in up to 16 Data Matrix
symbols. The original data can be correctly reconstructed regardless of the order in which the symbols
are scanned. If the feature is not implemented, reader should not transmit data in case of a structured
append symbol.
6.3 Symbol structure
6.3.1 General
Each Data Matrix symbol consists of data regions which contain nominally square modules set out in a
regular array. In larger symbols, data regions are separated by alignment patterns. The data region, or set of
data regions and alignment patterns, is surrounded by a finder pattern, and this shall in turn be surrounded
on all four sides by a quiet zone border. Figure 1 illustrates two representations of a Data Matrix symbol,
dark on light and reflectance reversal.
a) Data Matrix, dark on light b) Data Matrix, light on dark (reflectance reversal)
Figure 1 — Data Matrix "A1B2C3D4E5F6G7H8I9J0K1L2"
© ISO/IEC 2024 – All rights reserved
6.3.2 Finder pattern
The finder pattern is a perimeter to the data region and is one module wide. Two adjacent sides, the left and
lower sides, forming the L boundary, are solid lines; these are used primarily to determine physical size,
orientation and symbol distortion. The two opposite sides are made up of alternating dark and light modules.
These are used primarily to define the cell structure of the symbol, but also can assist in determining
physical size and distortion. The extent of the quiet zone is indicated by the corner marks in Figure 1.
6.3.3 Symbol sizes and capacities
Data Matrix symbols have an even number of rows and an even number of columns. Some symbols are
square with sizes from 10 x 10 to 144 x 144 not including quiet zones. Some symbols are rectangular with
sizes from 8 x 18 to 16 x 48 not including quiet zones. For all Data Matrix code symbols, the upper right
corner module has the opposite reflectance state (i.e. light or dark) of the “L” finder pattern (see Figure 1).
The complete attributes are given in Table 10.
7 Data Matrix code requirements
7.1 Encode procedure overview
7.1.1 General
Subclause 7.1 provides an overview of the encoding procedure. Following sections will provide more details.
An encoding example is given in Annex I. The following steps convert user data to a Data Matrix code symbol.
7.1.2 Step 1: data encodation
As Data Matrix includes various encodation schemes that allow a defined set of characters to be converted
into codewords more efficiently than the default scheme, analyse the data stream to identify the variety of
different characters to be encoded. Insert additional codewords to switch between the encodation schemes
and to perform other functions. Add pad characters as needed to fill the required number of codewords.
If the user does not specify the matrix size, then choose the smallest size that accommodates the data. A
complete list of matrix sizes is shown in Table 10.
Table 1 — Encodation schemes for Data Matrix code
Encodation scheme Characters Bits per data character
double digit numerics 4
ASCII ASCII values 0 to 127 8
Extended ASCII values 128 to 255 16
Upper case alphanumeric 5,33
C40
a
Lower case and special characters 10,66
Lower case alphanumeric 5,33
Text
b
Upper case and special characters 10,66
X12 ANSI X12 EDI data set 5,33
EDIFACT ASCII values 32 to 94 6
Base 256 All byte values 0 to 255 8
a
Encoded as two C40 values as result of use of a shift character.
b
Encoded as two Text values as result of use of a shift character.
7.1.3 Step 2: error checking and correcting codeword generation
For symbols with more than 255 codewords, sub-divide the codeword stream into interleaved blocks to
enable the error correction algorithms to be processed as shown in Annex A. Generate the error correction
© ISO/IEC 2024 – All rights reserved
codewords for each block. The result of this process expands the codeword stream by the number of error
correction codewords. Place the error correction codewords after the data codewords.
7.1.4 Step 3: module placement in matrix
Place the codeword modules in the matrix. Insert the alignment pattern modules, if any, in the matrix. Add
the finder pattern modules around the matrix.
7.2 Data encodation
7.2.1 Overview
The data may be encoded using any combination of six encodation schemes (see Table 1). ASCII encodation
is the basic scheme. All other encodation schemes are invoked from ASCII encodation and return to this
scheme. The compaction efficiencies given in Table 1 need to be interpreted carefully. The best scheme
for a given set of data may not be the one with the fewest bits per data character. If the highest degree of
compaction is required, account has to be taken of switching between encodation schemes and between
code sets within an encodation scheme (see Annex J). It should also be noted that even if the number of
codewords is minimised, the codeword stream sometimes needs to be expanded to fill a symbol. This fill
process is done using pad characters.
7.2.2 Default character interpretation
The default character interpretation for character values 0 to 127 shall conform to ISO/IEC 646 IRV. The
default character interpretation for character values 128 to 255 shall conform to ISO/IEC 8859-1. The
graphical representation of data characters shown throughout this document complies with the default
interpretation. This interpretation can be changed using ECI escape sequences, see 7.3. The default
interpretation corresponds to ECI 000003.
7.2.3 ASCII encodation
ASCII encodation is the default set for the first symbol character in all symbol sizes. It encodes ASCII data,
double density numeric data and symbology control characters. Symbology control characters include
function characters, the pad character and the switches to other code sets. ASCII data is encoded as
codewords 1 to 128 (ASCII value plus 1). Extended ASCII (data values 128 to 255) is encoded using the upper
shift symbology control character (see 7.2.4.3). The digit pairs 00 to 99 are encoded with codewords 130 to
229 (numeric value plus 130). The ASCII code assignments are shown in Table 2.
NOTE ASCII encodation is the name of the character set in Data Matrix. It is not to be confused with the ASCII
character set (ISO/IEC 646 IRV).
Table 2 — ASCII encodation values
Codeword Data or function
0 Not to be used in ASCII encodation
1 to 128 ASCII data (ASCII value + 1)
129 Pad
130 to 229 2-digit data 00 to 99 (Numeric Value + 130)
230 Latch to C40 encodation
231 Latch to Base 256 encodation
232 FNC1
233 Structured Append
234 Reader Programming
235 Upper Shift (shift to Extended ASCII)
236 05 Macro
© ISO/IEC 2024 – All rights reserved
TTabablele 2 2 ((ccoonnttiinnueuedd))
Codeword Data or function
237 06 Macro
238 Latch to ANSI X12 encodation
239 Latch to Text encodation
240 Latch to EDIFACT encodation
241 ECI Character
242 to 255 Not to be used in ASCII encodation
7.2.4 Symbology control characters
7.2.4.1 General
Data Matrix symbols have several special symbology control characters, which have particular significance
to the encodation scheme. These characters shall be used to instruct the decoder to perform certain
functions or to send specific data to the host computer as described in 7.2.4.2 to 7.2.4.10. These symbology
control characters, with the exception of values from 242 through 255, are found in the ASCII encodation
(see Table 2).
7.2.4.2 Latch characters
A latch character shall be used to switch from ASCII encodation to one of the other encodation schemes. All
codewords which follow a latch character shall be compacted according to the new encodation scheme. The
encodation schemes have different methods for returning to the ASCII encodation.
7.2.4.3 Upper Shift character
The Upper Shift character is used in combination with an ASCII value (1 to 128) to encode an extended ASCII
character (129 to 255). An extended ASCII character encoded in the ASCII, C40, or Text encodation scheme
requires a preceding Upper Shift character and the extended ASCII character value decreased by 128 is then
encoded according to the rules of the encodation scheme. In ASCII encodation, the Upper Shift character is
represented by codeword 235. The reduced data value (i.e. ASCII value minus 128) is transformed into its
codeword value by adding 1. For example, to encode ¥ (Yen currency symbol) (ASCII value 165), an upper
shift character (codeword 235) is followed by value 37 (165 to 128), which is encoded as codeword 38. If
there are long data strings of characters from the extended ASCII range, a latch to Base 256 encodation
should be more efficient.
7.2.4.4 Pad character
If the encoded data, irrespective of the encodation scheme in force, does not fill the data capacity of the
symbol, pad characters (value 129 in ASCII encodation) shall be added to fill the remaining data capacity
of the symbol. The pad characters shall only be used for this purpose. Before inserting pad characters, it is
necessary to return to ASCII encodation if in any other encodation mode. The 253-State pattern randomising
algorithm shall be applied to the pad characters starting at the second pad character as specified in Annex B.
7.2.4.5 ECI character
An ECI character is used to change from the default interpretation used to encode data. The ECI protocol is
common across a number of symbologies and its application to Data Matrix is defined more fully in 7.3. The
ECI character shall be followed by one, two or three codewords which identify the ECI being invoked. The
new ECI remains in place until the end of the encoded data, or until another ECI character is used to invoke
another interpretation. See also Annex M.
© ISO/IEC 2024 – All rights reserved
7.2.4.6 Shift characters in C40 and Text encodation
In C40 and Text encodation, three special characters, called shift characters, are used as a prefix to one of 40
values to encode about three quarters of the ASCII characters. This allows the remaining ASCII characters to
be encoded in a more condensed way with single values.
7.2.4.7 FNC1 alternate data type identifier
To encode data to conform to specific industry standards as authorised by AIM Inc., a FNC1 character shall
appear in the first or second symbol character position (or in the fifth or sixth data positions of the first
symbol of Structured Append). FNC1 encoded in any other position is used as a field separator and shall be
G
transmitted as control character (ASCII value 29).
S
7.2.4.8 Macro characters
Data Matrix provides a means of abbreviating an industry specific header and trailer in one symbol
character. This feature exists to reduce the number of symbol characters needed to encode data in a symbol
using certain structured formats. A Macro character shall be in the first character position of a symbol. They
shall not be used in conjunction with Structured Append and their functions are defined in Table 3. The
header shall be transmitted as a prefix to the data stream and the trailer shall be transmitted as a suffix to
the data stream. The symbology identifier, if used, shall precede the header.
Table 3 — Macro functions
Interpretation
Macro codeword Name
Header Trailer
R G R E
236 05 Macro [)> 05 o
S S S T
R G R E
237 06 Macro [)> 06 o
S S S T
7.2.4.9 Structured Append character
A Structured Append character is used to indicate that the symbol is part of a Structured Append sequence
according to the rules defined in 7.5.
7.2.4.10 Reader Programming character
A Reader Programming character indicates that the symbol encodes a message used to program the reader
system. The Reader Programming character shall appear as the first codeword of the symbol and Reader
Programming shall not be used with Structured Append.
7.2.5 C40 encodation
7.2.5.1 General
The C40 encodation scheme is designed to optimise the encoding of upper-case alphabetic and numeric
characters but also enables other characters to be encoded by the use of shift characters in conjunction with
the data character.
C40 characters are partitioned into 4 subsets. Characters of the first set, called the basic set, are the three
special shift characters, the space character, and the ASCII characters A to Z and 0 to 9. They are assigned
to a single C40 values. Characters of the other sets shall be assigned to one of the three shift characters,
pointing to one of the 3 remaining subset, followed by one of the C40 values (see Table C.1).
As a first stage, each data character is converted into a single C40 value or a pair of C40 values. The complete
string of C40 values is then decomposed into groups of three values (special rules apply if one or two values
remain at the end, see 7.2.5.3). Each triplet (C1, C2, C3) is then encoded into a 16-bit value according to the
formula: (1600 * C1) + (40 * C2) + C3 + 1. Each 16-bit value is then separated into 2 codewords by taking the
most significant 8 bits and the least significant 8 bits.
© ISO/IEC 2024 – All rights reserved
7.2.5.2 Switching to and from C40 encodation
It is possible to switch to C40 encodation from ASCII encodation using the appropriate latch codeword (230).
Codeword 254 immediately following a pair of codewords in C40 encodation acts as an unlatch codeword
to switch back to ASCII encodation. Otherwise, the C40 encodation remains in effect to the end of the data
encoded in the symbol.
7.2.5.3 C40 encodation rules
Each pair of codewords represents a 16-bit value where the first codeword represents the most significant 8
bits. Three C40 values (C1, C2, C3) shall be encoded as:
(1 600 * C1) + (40 * C2) + C3 + 1
which produces a value from 1 to 64 000. Table 4 illustrates three C40 values compacted into two codewords.
Characters in the Shift 1, Shift 2 and Shift 3 sets shall be encoded by first encoding the appropriate shift
character, and then the C40 value for the data. C40 encodation may be in effect at the end of the symbol's
codewords which encode data.
The following rules apply when only one or two symbol characters remain in the symbol before the start of
the error correction codewords:
a) If two symbol characters remain and three C40 values remain to be encoded (which may include both
data and shift characters) encode the three C40 values in the last two symbol characters. A final unlatch
codeword is not required.
b) If two symbol characters remain and two C40 values remain to be encoded (the first C40 value may be a
shift or data character but the second shall represent a data character) append a “Shift 1” character (C40
value 0) to the input to increase to three characters so that it can be processed normally as with any
three character C40 input. A final unlatch codeword again is not required.
c) If two symbol characters remain and only one C40 value (data character) remains to be encoded, the
first symbol character is encoded as an unlatch character and the last symbol character is encoded with
the data character using the ASCII encodation scheme.
d) If one symbol character remains and one C40 value (data character) remains to be encoded, the last
symbol character is encoded with the data character using the ASCII encodation scheme. The unlatch
character is not encoded, but is assumed, before the last symbol character.
In all other cases, either an unlatch character is used to exit the C40 encodation scheme before the end
of the symbol, or a larger symbol size is required to encode the data.
Table 4 — Example of C40 encoding
Data characters AIM
C40 values 14, 22, 26
Calculate 16-bit value (1600 * 14) + (40 * 22) + 26 + 1 = 23307
1st codeword: (16-bit value) div 256 23 307 div 256 = 91
2nd codeword: (16-bit value) mod 256 23 307 mod 256 = 11
Codewords 91, 11
7.2.5.4 Use of Upper Shift with C40
In C40 encodation the Upper Shift character is not a symbology function character but a shift within the
encodation set. When a data character from the extended ASCII character range is encountered, three or
four values in C40 encodation need to be encoded according to the following rule:
IF [ASCII value − 128] is in the Basic Set then:
© ISO/IEC 2024
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...