question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataMatrix decoder do not support unicode text

See original GitHub issue

Hi there! I’ve discovered, that zxing (a least, android barcode scanner) decodes DataMatrix codes with unicode text as ASCII (and, so brake it). I.e. it displays ÑеÑÑ instead of тест (ciryllic “test”).

OTOH, QR-encoded unicode is decoded fine.

Can somebody fix that (or, at least, advice/guide me how to fix it)?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
eladtscommented, Mar 18, 2017

The zxing decoder does not support ECI with Data Matrix, as evident by the code:

            case 241: // ECI Character
            // TODO(bbrown): I think we need to support ECI
            //throw ReaderException.getInstance();
            // Ignore this symbol for now

at zxing/core/src/main/java/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java

It looks like @msva was correct in reporting this issue. As zxing does support ECI and auto UTF-8 detection for QR, it should be simple to add these capabilities to the Data Matrix decoder. @srowen, please re-open this issue.

1reaction
srowencommented, Jan 14, 2015

The barcode encodes 6 bytes with Base 256 encoding, and that is the entire content of the barcode. Without an ECI segment, the spec says that the bytes are interpreted as ISO-8859-1, so the result from the library is correct. The barcode needs an ECI segment.

Now, I also don’t know that ECI support was ever finished for Data Matrix. But that wouldn’t be hard to tack on since it’s implemented for QR code. But this barcode does not have one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appendix D. Unicode String Encode Support - Morovia
Data matrix barcode (as defined in ISO 16022) does not support Unicode natively. The default character set is ISO8859-1. Theoretically the support could ......
Read more >
Developers - DataMatrix decoder do not support unicode text -
Hi there! I've discovered, that zxing (a least, android barcode scanner) decodes DataMatrix codes with unicode text as ASCII (and, so brake it)....
Read more >
How to get an UTF-8 encoded datamatrix barcode
Hi, I'm not sure about one thing. I don't get the datamatrix barcode with UTF-8 encoded text and special characters to work.
Read more >
Is it possible to represent characters beyond ASCII in ...
As far, as I tested, encodes and decodes messages contatining unicode pretty fine, but it doesn't properly mark encoded message ("Hey, ...
Read more >
How to encode Unicode in PDF417-DataMatrix-QRCode ...
Most current 2D barcodes like Data Matrix, QR Code, Aztec Code, PDF417, etc; were not designed to encode Unicode two-byte characters but ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found