[BUG] Cyrillic and other characters support in QR code from pkpass files
Similar issue as in SeineEloquenz/fosswallet#110, I see the same question marks when scanning the generated QR code. I don't know, if it's possible to fix this here because of, perhaps, generic way to generate QR codes. I can send .pkpass file as an example, if it necessary.
Just an example, how it works right now:
I was pretty sure I had to do something with messageEncoding in the pkpass parser, it's even marked as a todo, but I indeed had no file to test with so couldn't be sure. If you could send the affected file that would be great yeah :)
@TheLastProject of course I can, but only by sending it via email. It contains sensetive information, so I can't post it here. Is this acceptable for you? I saw an email in your gh profile, may I send to it?
Yeah sure :)
I do prefer public when possible, especially because then stuff can be added to unit tests, but yeah, with files like these I very much understand :)
Just sent it! Check your inbox.
Can confirm: the value is correctly read, but the barcode itself is generated incorrectly. Seems like this might be a similar issue to #1697 and #1496, but the card ID itself is saved fine so easier to debug this probably :)
So? Is there any progress on this issue? I'll be traveling across the EU soon, and I'm choosing the right mobile application right now.
I haven't had time to look deeper into this no. Contributions welcome.
Okay I did look a bit deeper today and... what a rabbit hole it is.
The patch in FossWallet makes some sense, reading the messageEncoding field in a pkpass file is definitely correct and will at least fix pkpass files. However, it doesn't fix scanning QR codes and the likes.
Scouring the internet for several hours I could find that zxing seems to default to ISO-8859-1 for most barcodes, but that is definitely wrong for cyrillic. However! Defaulting to UTF-8 will also break some scanners according to my research, as not all scanners support UTF-8. So just always forcing UTF-8 is a bad idea too (I expect little issues here for FossWallet because the messageEncoding is a required field and thus should always be defined).
I created https://github.com/CatimaLoyalty/Android/pull/2716 but I don't think I'll merge that very soon. I first want to get the crash reporter out there, just in case this goes wrong.