DHL parcel stamp displayed incorrectly - Probably because of German umlaut in QR Code
I recently bought a parcel stamp online at DHL in Germany and was happy to get a .pkpass file. However, at the post office it didn't work. The image in the mail itself did, so there was no issue with the reader. Because the QR code contains my private adress, I won't share it here.
Since the code contains the sender and recipient's adresses, it is common to have 'Straße' with the German umlaut 'ß' in the code. Unfortunately PassAndroid displays it incorrectly as '...Carl-Zeiss-Stra�e...' (part of the QR code). Here's the original the pass.json with 3 dots or fake data for sensitive parts:
{
"formatVersion": 1,
"serialNumber": "5S5LD8AH8X",
"passTypeIdentifier": "pass.de.dhl.onlinefrankierung",
"description": "Versandmarke",
"teamIdentifier": "4TS829QN5Q",
"organizationName": "DP IT Brief GmbH",
"backgroundColor": "rgb(254,204,19)",
"barcode": {
"format": "PKBarcodeFormatQR",
"altText": "8FPFUKX691",
"message": "OF|8FPFUKX69|1|Paket bis 2 kg|A|Simon Tenbeitel||...str. 12|12345|Musterstadt|Deutschland|...|Widerruf|Carl-Zeiss-Straße 34|12345|Musterstadt|Deutschland||||72793023007000|129941847662|240518||8",
"messageEncoding": "ISO-8859-1"
},
"generic": {
"headerFields": [
{
"key": "DATEFIELD",
"value": "2018-04-24 07:43"
}
],
"primaryFields": [
{
"key": "RECEIVER",
"label": "Empfänger(in)",
"value": "... Widerruf",
"textAlignment": "PKTextAlignmentLeft"
}
],
"secondaryFields": [
{
"key": "PRODUCT",
"value": "Paket bis 2 kg",
"textAlignment": "PKTextAlignmentCenter"
}
],
"backFields": [
{
"key": "RECEIVER",
"label": "Empfänger(in)",
"value": "... Widerruf\nCarl-Zeiss-Straße 34\n12345 Musterstadt"
},
{
"key": "SENDER",
"label": "Absender(in)",
"value": "Simon Tenbeitel\nMusterstr. 12\n12345 Musterstadt"
},
{
"key": "PURCHASEDATE",
"label": "Kaufdatum: ",
"value": "2018-04-24 07:43"
},
{
"key": "PRODUCT_INFO_KEY",
"label": "Produkt: ",
"value": "Paket bis 2 kg"
},
{
"key": "CODEID_KEY",
"label": "QR-Code-ID: ",
"value": "8FPFUKX691"
},
{
"key": "INFO_KEY",
"value": "Vielen Dank für die Nutzung der DHL Online Frankierung.\nDrucken Sie jetzt Ihre Versandmarken in einer unserer Filialen. Zeigen Sie dazu in der Filiale einfach den QR-Code vor. Alle Filialen finden Sie in der DHL Paket App im Menüpunkt Postfinder oder unter www.postfinder.de.\nEinzelne internationale Produkte und Produkte mit Abholung sind von einem Druck in Filialen ausgeschlossen. In diesem Fall erhalten Sie keinen QR-Code."
}
]
},
"suppressStripShine": true
}
When I debug the app, the pass has format QR_CODE and the correct String in the message field. But when I scan the code with QR Droid, the 'ß' becomes '�'.
Will add an attribute for encoding to the pass, as Apple also defines it: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html
If this fixes the bug, I'll open a PR. Just reported this issue to keep track while working on it.
I can confirm that this is still an issue. All of my DHL parcel QR codes are wrong when importing the pkpass into this app.