File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
libpretixsync/src/main/java/eu/pretix/libpretixsync/utils Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,14 @@ package eu.pretix.libpretixsync.utils
33fun cleanInput (raw_input : String , source_type : String ): String {
44 var cleaned = raw_input.replace(Regex (" [\\ p{C}]" ), " �" ) // remove unprintable characters
55 if (source_type == " barcode" ) {
6- // Remove ECI flag for Latin-1 which is prepended by some barcode scanners to QR codes
7- // generated by the app "WalletPasses" even though it is the default encoding.
6+ // Remove ECI flag which is prepended by some barcode scanners to QR codes generated by the
7+ // app "WalletPasses" (and recently even Google Wallet) even though it is the default encoding.
88 // https://en.wikipedia.org/wiki/Extended_Channel_Interpretation
9- cleaned = cleaned.removePrefix(" \\ 000001" )
9+ cleaned = cleaned
10+ .removePrefix(" \\ 000001" ) // Latin1
11+ .removePrefix(" \\ 000003" ) // Latin1
12+ .removePrefix(" \\ 000026" ) // UTF-8
13+ .removePrefix(" \\ 000027" ) // ASCII
1014 }
1115 return cleaned
1216}
You can’t perform that action at this time.
0 commit comments