mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-07 14:38:04 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
008b5254c6 | ||
|
|
1b1163a100 | ||
|
|
70c14514e6 | ||
|
|
5830813170 | ||
|
|
a07d4d1b8a | ||
|
|
29c4ccf4d9 |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
1
fastlane/metadata/android/en-US/changelogs/161.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/161.txt
Normal file
@@ -0,0 +1 @@
|
||||
- Disable automatic barcode encoding detection for now (breaks too many cards)
|
||||
Reference in New Issue
Block a user