googlesamples / googlesamples/mlkit
Barcode scanning fails with "Unknown encoding" for ISO-8859-1 encoded data matrix
- Dominant language
- Kotlin
- Stars
- 4.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
The official German medication plan data matrix ("BMP", Bundeseinheitlicher Medikationsplan) expects data to be encoded with ISO-8859-1. If the data contains a German umlaut, Google Vision barcode scanning fails with an "Unknown encoding" error.
Scanning the following data matrix reproduces the bug:

This bug sadly renders Google Vision barcode scanning useless for the mentioned use case.
Two suggested solutions:
- accept other encodings than ASCII and UTF-8
- provide access to the raw data through a byte array
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.