Print vCard as QR-Code with Umlauts

I am trying to print a VCard as QR-Code.
https://goqr.me/de/qr-codes/typ-vcard.html

The basics are simple because I can build the Barcode string easily.

Barcode(
“BEGIN:VCARD¶VERSION:3.0¶”+
“N:” + ADDR_Kunden.NameLast + “;” + ADDR_Kunden.NameFirst + “¶” +
“FN:” + ADDR_Kunden.NameFirst + " " + ADDR_Kunden.NameLast + “¶” +
“ORG:” + ADDR_Kunden.Name1 + “;” + ADDR_Kunden.Name2 + “;” + ADDR_Kunden.Name3 +“¶” +
“TITLE:” + ADDR_Kunden.Function +“¶” +
“ADR;TYPE=WORK,POSTAL,PARCEL:;;” + ADDR_Kunden.Street + “;” + ADDR_Kunden.City +“;;” + ADDR_Kunden.ZipCode + “;” + ADDR_Kunden.Country +“¶” +
“TEL;TYPE=VOICE,WORK:” +ADDR_Kunden.CommPhoneOffice +“¶” +
“EMAIL;TYPE=INTERNET,WORK,PREF:” + ADDR_Kunden.CommEmail1 +“¶” +
“URL;WORK:” + ADDR_Kunden.CommInternet +“¶” +
“URL:” + ADDR_Kunden.LinkedIn +“¶” +
“URL:” + ADDR_Kunden.XING +“¶” +
“END:VCARD”,
“QRCode”)

The problem comes up, when I have Umlauts “äöüäöüß” in the text fields.
I can’t see a method to encode text into UTF8. Or I don’t see a function to get the field as mime encoded.

Is there any trick, or other way to go?

To see how to encode UTF-8 characters in a QR-Code, please refer to the following article from our knowledgebase:

There is currently now way for me, to extend any functionality or to switch to LL28.
Also I can’t currently extend functions for the report engine in the current version we ship…

I see no way to achieve this using LL27 built in functionality?
Correct?

Would an own, pre-assembled variable for the vCard content be a possibility? In this case the replacements would have to be already included, analog to an own designer function ("~d…~d…", where “…” represents the UTF8 bytes).

Unfortunately we can not think of more/other possibilities to achieve this.

I solved it with a trick.
I built the VCARD as expected. Than I used UrlEncode$ and form a correct link for QR Code API

Than I used this http link and passed the result into the Drawing function.

The API of this site processes all Umlauts correct.

Done :wink:

2 Likes

Very nerdy indeed :nerd_face: - thanks for sharing your solution.

1 Like