Using QR codes in the Online Editor

Technote on how to correctly use QR codes in the Online Editor, when dealing with accented or other non-ASCII characters in vCards.

business cards with QR codes

How to create QR codes in the Online Editor is explained in the StoreFront Online Help. The value for a valid QR code needs to be specified in text format. Any type of character is supported: ASCII as well as non-ASCII characters such as umlauts, accented characters, ß, etc.

From experience, we’ve learned that QR code readers do not always correctly represent non-ASCII characters. For plain text, there is usually no problem. But when you start using specific formats such as vCards for example, the accented characters often get displayed incorrectly.

Although it is not required for a valid vCard, explicitly specifying the character set encoding does seem to help to get the non-ASCII characters displayed correctly by all QR code readers.

The value that needs to be assigned to the QR code in the Online Editor needs to be specified according to one of the following standards: vCard 2.1, vCard 3.0 or vCard 4.0. In order to generate a valid vCard, you should follow the specification described here.

Keep in mind that all fields in a vCard are subject to a certain convention that needs to be respected in order to get the expected output. You can find many examples online about how to configure the fields, and this will usually work fine until you start using non-ASCII characters.

Explicitly specifying the encoding of the character set as UTF-8 is a workaround. This specification needs to be set on each individual field, and it needs to be put in the correct position using the correct syntax.

Examples

First and Last name
Specification: https://tools.ietf.org/html/rfc6350#section-6.2.2

e.g.: Jürgen Löw

Without encoding With encoding
BEGIN:VCARD
VERSION:4.0
N:Löw;Jürgen
END:VCARD
BEGIN:VCARD
VERSION:4.0
N;CHARSET=UTF-8:Löw;Jürgen
END:VCARD

Address
Specification: https://tools.ietf.org/html/rfc6350#section-6.3.1

e.g.: Work address:
Bahnhofsstraße 99
51149 Köln
Deutschland

Without encoding With encoding
BEGIN:VCARD
VERSION:4.0
N:Löw;Jürgen
ADR;WORK;LABEL=”Bahnhofsstraße 99\nKöln\n51149\nDeutschland”
:;;Bahnhofsstraße 99;Köln;;51149;Deutschland
END:VCARD
BEGIN:VCARD
VERSION:4.0
N;CHARSET=UTF-8:Löw;Jürgen
LABEL;WORK;;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:“Bahnhofsstraße 99\nKöln\n51149\nDeutschland”
ADR;WORK;;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8
:;;Bahnhofsstraße 99;Köln;;51149;Deutschland
END:VCARD