zxing: 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). 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)?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (7 by maintainers)
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.