Compare commits

...

6 Commits

Author SHA1 Message Date
Sylvia van Os
008b5254c6 Release Catima 2.41.4 2026-01-04 23:17:37 +01:00
Sylvia van Os
1b1163a100 Merge pull request #2941 from CatimaLoyalty/create-pull-request/patch-1767564871
Update Fastlane changelogs
2026-01-04 23:14:46 +01:00
TheLastProject
70c14514e6 Update Fastlane changelogs 2026-01-04 22:14:31 +00:00
Sylvia van Os
5830813170 Update CHANGELOG 2026-01-04 23:14:14 +01:00
Sylvia van Os
a07d4d1b8a Merge pull request #2940 from CatimaLoyalty/fix/disable_automatic_encoding
Disable automatic barcode encoding guessing for now
2026-01-04 23:12:57 +01:00
Sylvia van Os
29c4ccf4d9 Disable automatic barcode encoding guessing for now 2026-01-04 22:57:50 +01:00
4 changed files with 20 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## v2.41.4 - 161 (2026-01-04)
- Disable automatic barcode encoding detection for now (breaks too many cards)
## v2.41.3 - 160 (2026-01-04)
- Follow-up for fix in 2.41.2 for cards explicitly set to ISO-8859-1

View File

@@ -19,8 +19,8 @@ android {
applicationId = "me.hackerchick.catima"
minSdk = 21
targetSdk = 36
versionCode = 160
versionName = "2.41.3"
versionCode = 161
versionName = "2.41.4"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true

View File

@@ -190,8 +190,19 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
if (chosenEncoding != null) {
Log.d(TAG, "Encoding explicitly set, " + chosenEncoding.name());
} else {
chosenEncoding = Charset.forName(StringUtils.guessEncoding(cardId.getBytes(), new ArrayMap<>()));
Log.d(TAG, "Guessed encoding: " + chosenEncoding.name());
// FIXME: Guessing encoding using zxing causes too many false positives and breaks the Deutschlandticket, a common public transport ticket in Germany
// See https://github.com/CatimaLoyalty/Android/issues/2932
//
// So, for now, we just force ISO in the "guessing" path until we figure out a better way to guess
// The previous code is commented before, DO NOT UNCOMMENT, IT IS BROKEN
//
// chosenEncoding = Charset.forName(StringUtils.guessEncoding(cardId.getBytes(), new ArrayMap<>()));
// Log.d(TAG, "Guessed encoding: " + chosenEncoding.name());
// FIXME: Figure out a good way to automatically determine the best format to use, to not break UTF-8 barcodes
// However, make sure to NOT break the Deutschlandticket!
chosenEncoding = StandardCharsets.ISO_8859_1;
Log.w(TAG, "The encoding guessing code path is temporarily disabled due to it breaking Deutschlandticket. Forcing ISO-8859-1...");
}
// We don't want to pass the ISO-8859-1 as an encoding hint as zxing may add this as ECI

View File

@@ -0,0 +1 @@
- Disable automatic barcode encoding detection for now (breaks too many cards)