Issue 1484 in zxing: DataMatrix Codeword 237 Translation

362 views
Skip to first unread message

zx...@googlecode.com

unread,
Jan 17, 2013, 10:41:30 AM1/17/13
to zx...@googlegroups.com
Status: New
Owner: ----

New issue 1484 by wwreaver...@gmail.com: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

If if DataMatrix Codeword 237 is detected as first Codeword the decoder
shall add a prefix and a suffix (ISO 15434 Format 06).

The prefix sequence shall be
Codeword : 237 Meaning: Macro 06
Prefix: [)>RS06GS

Suffix : RS EOT
RS is control character Record Separator
GS is control character Group Separator
EOT is control character END OF TRACK

Error: the prefix part RS06 is translated incorrectly

For Codeword 236 we have Macro 05
Codeword 232 does not have a Macro function but indicates the use of GS1
data structures (Application Identifiers)


zx...@googlecode.com

unread,
Jan 17, 2013, 11:10:19 AM1/17/13
to zx...@googlegroups.com

Comment #1 on issue 1484 by srowen: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

Can you translate this into a more actionable change -- ideally a patch? I
don't understand the behavior well enough to grok this.

zx...@googlecode.com

unread,
Jan 18, 2013, 6:37:47 AM1/18/13
to zx...@googlegroups.com

Comment #2 on issue 1484 by wwreaver...@gmail.com: DataMatrix Codeword 237
Translation
http://code.google.com/p/zxing/issues/detail?id=1484

Hi,

Codeword 237 shall be translated into a prefix sequence and a suffix
sequence.

See ISO/IEC 16022 Chapter 5.2.4.7 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
must 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
236 05 Macro [)>R S05G S R S EoT
237 06 Macro [)>R S06G S R S EoT

Chapter 11.3
11.3 Protocol for Macro characters in the first position (ECC 200 only)
This protocol is used to encode two specific message headers and trailers
in an abbreviated manner in ECC 200 symbols.

When a Macro character is in the first position a preamble and postamble
shall be transmitted. If the first symbol character is 236 (i.e. encoding
Macro 05), then the preamble [)>RS05GS shall precede the encoded data that
follows it. If the first symbol character is 237 (i.e. encoding Macro 06),
then the preamble [)>RS06GS shall precede the encoded data that follows it.
The postamble RS EoT shall be transmitted after the data in both cases.

The decoder must detect that codeword and simply substitute the content. It
works mainly except the sequence in between RS and character 0 and
character 6.

I get with version 4.3.1 this:

0: 91 ([)
1: 41())
2: 62(>)
3: 7686 (B) (thats wrong - RS is required, then 0 and then 6)
4: 29 () thats ASCII 29 = GS; thats perfect.

I hope that clarifies this

B.R:
Wilfried

zx...@googlecode.com

unread,
Jan 18, 2013, 7:09:52 AM1/18/13
to zx...@googlegroups.com

Comment #3 on issue 1484 by srowen: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

I have the spec -- what I'm asking is, what in the code should change?

zx...@googlecode.com

unread,
Jan 18, 2013, 8:23:42 AM1/18/13
to zx...@googlegroups.com

Comment #4 on issue 1484 by wwreaver...@gmail.com: DataMatrix Codeword 237
Translation
http://code.google.com/p/zxing/issues/detail?id=1484

Is:

0: 91 ([)
1: 41())
2: 62(>)
3: 7686 (B)
4: 29 ()

should:

0: 91 ([)
1: 41())
2: 62(>)
3: 30 () [RS]
4: 48 (0)
5: 54 (6)
6: 29 () [GS]

zx...@googlecode.com

unread,
Jan 18, 2013, 8:37:54 AM1/18/13
to zx...@googlegroups.com

Comment #5 on issue 1484 by srowen: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

I mean the *source* code, not barcode :) I'm asking for a patch; this is
something you know more about than probably anyone here.

zx...@googlecode.com

unread,
Jan 18, 2013, 2:18:25 PM1/18/13
to zx...@googlegroups.com

Comment #6 on issue 1484 by wwreaver...@gmail.com: DataMatrix Codeword 237
Translation
http://code.google.com/p/zxing/issues/detail?id=1484

Is this doing These Job ?

// write header, ISO 16022::5.2.4.7
m_pResult->HumanRead.push_back(THumanRead("[)>?", eHR_CTRL +
eHR_HumanRead));
m_pResult->HumanRead.back().cVal[3] =
(char)30; // [RS]
m_pResult->HumanRead.push_back(THumanRead(b05 ? "05" : "06", eHR_CTRL +
eHR_HumanRead));
m_pResult->HumanRead.push_back(THumanRead(29, eHR_CTRL +
eHR_HumanRead)); // [GS]
Am 18.01.2013 14:37 schrieb <zx...@googlecode.com>:

zx...@googlecode.com

unread,
Jan 18, 2013, 2:45:46 PM1/18/13
to zx...@googlegroups.com

Comment #7 on issue 1484 by srowen: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

This just looks like editing a string, and isn't Java or a patch.


zx...@googlecode.com

unread,
Jan 18, 2013, 2:53:19 PM1/18/13
to zx...@googlegroups.com
Updates:
Status: NotABug

Comment #8 on issue 1484 by srowen: DataMatrix Codeword 237 Translation
http://code.google.com/p/zxing/issues/detail?id=1484

OK, I looked at the source code:

} else if (oneByte == 236) { // 05 Macro
result.append("[)>\u001E05\u001D");
resultTrailer.insert(0, "\u001E\u0004");
} else if (oneByte == 237) { // 06 Macro
result.append("[)>\u001E06\u001D");
resultTrailer.insert(0, "\u001E\u0004");

This looks correct and matches exactly what you posted and what's in the
spec. You don't see the invisible control characters when you print the
string, but they are in the string that is returned.

Reply all
Reply to author
Forward
0 new messages