mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-04-28 19:28:01 -04:00
If zxing is not explicitly told a barcode is UTF-8, it may render it incorrectly. Which caused https://github.com/CatimaLoyalty/Android/issues/2555. However, when an encode hint is set, it will cause zxing to set an ECI hint inside the barcode, which some scanners may trip over and cause scanning failures, leading to https://github.com/CatimaLoyalty/Android/issues/2921. This change only passes the encoding in automatic mode if zxing explicitly guesses it to be UTF-8, and otherwise doesn't pass anything, to keep the ECI empty. This might need to be expanded for other types like SJIS, but as nobody ever reported such a bug let's assume it's not necessary for now.