DataMatrix decoder do not support unicode text
See original GitHub issueHi 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:
- Created 9 years ago
- Comments:20 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The zxing decoder does not support ECI with Data Matrix, as evident by the code:
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.
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.