Add barcode encoding support - #2716
Conversation
|
@joserebelo Before I finish this, I have a question for the Gadgetbridge side of this: The plan is to add a new What would be the best behaviour for the ContentProvider update?
Edit: With regards to 2, I think it makes most sense for the ContentProvider to give the simplest usable data to draw a card, instead of the exactly correct info. If full export-import compat is desired, the exporter seems more sensible to use anyway. So, barcodeEncoding would give whatever Catima would be using, guessed or not, but never null. |
|
@TheLastProject apologies for the delay, I was away and just now catching up no a few notifications.
|
5014a20 to
cc176bb
Compare
|
Thanks for the info @joserebelo. I agree that would be better. Now for me to figure out how I'd go about that, giving it seems to currently directly return a database cursor (and I'm not sure how to override a field in a cursor) 😅 I may have to release a v1 which does it "wrong" or just doesn't expose it just to be able to get this bug fixed, but let's hope I figure something out soon (tips very welcome!) |
|
@TheLastProject I don't yet have a lot of experience with this, but we might be able to use a CursorWrapper to override specific columns. I would not block these changes on the ContentProvider - maybe just omit the column from it for now, yes. |
0fd9fa5 to
73d873f
Compare
- Add new barcodeencoding field to database - Read barcode encoding from pkpass file - Add barcodeencoding to import/export - Add barcodeencoding to share URI - On default, use zxing's GuessEncoding function in StringUtils (this should not use UTF-8 unless needed) - Allow manually forcing ISO-8859-1 or UTF-8
73d873f to
0c61abf
Compare
|
Follow-up for Gadgetbridge in #2890. If anyone asks on the Gadgetbridge side why it's not supported, feel free to send them to that issue :) |
Add barcode encoding support
TODO: