Data Merge QR codes: characters outside Windows-1252 become NUL bytes (manually generated QR is correct)
InDesign 2027 (22.0), Windows 11, system ANSI code page 1252
STEPS
1. Create a data source with a #qr column containing: Krňák ředitel Česká ů
2. Merge, export to PDF and decode the QR code.
EXPECTED
The decoded text equals the source.
ACTUAL
Characters outside Windows-1252 (ň ř č Č ů, U+202F) are each replaced by a 0x00 byte. Characters á é í ý š survive as correct UTF-8.
Example: in a name containing "ňá", the QR code holds the bytes 00 C3 A1 instead of C5 88 C3 A1. The output itself is UTF-8, so the text seems to pass through a Windows-1252 conversion first (my inference).
I saw this in real vCard 3.0 data containing these characters. The string in step 1 is a minimal sample; I have not merged it on its own.
WHAT I TESTED
- UTF-8 CSV and UTF-16 LE (BOM) tab-delimited TXT as the data source: same result.
- The same characters merged as ordinary text: correct.
- Object > Generate QR Code > Plain Text with "Krňák ředitel Česká ů": correct.
- Scripted createPlainTextQRCode(): correct, all 17 codes matched the source exactly.
WORKAROUND
After merging, regenerate each QR code by script. frame = the frame holding the merged QR code, value = the text from the data source:
var old = frame.graphics[0].geometricBounds;
var text = value.split(String.fromCharCode(92) + "n").join(String.fromCharCode(10));
frame.createPlainTextQRCode(text, app.activeDocument.swatches.itemByName("Paper"));
frame.graphics[0].geometricBounds = old;
The second line turns literal \n into real line breaks. Replace "Paper" with your own swatch (my QR code was white on blue).
Please make Data Merge pass Unicode text to the QR encoder. This is separate from ID-4208669, which concerned the vCard generator and is marked as fixed in 20.1.