Skip to content

Conversation

@TheLastProject
Copy link
Member

If zxing is not explicitly told a barcode is UTF-8, it may render it incorrectly. Which caused
#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
#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.

Fixes #2921

If zxing is not explicitly told a barcode is UTF-8, it may render it
incorrectly. Which caused
#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
#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.
@TheLastProject TheLastProject merged commit 7739249 into main Jan 3, 2026
3 checks passed
@TheLastProject TheLastProject deleted the fix/2921 branch January 3, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QR code card working in 2.40.x is broken in 2.41.1

1 participant