I'm trying to code czech names in QRcode using qrcode package and luaLaTeX engine. Some accents are encoded in QRcode and the reader (QR Code Reader or QR Extrme, both run on Xperia L1) is unable to decode them and tries refocus. Correct QR code with same size is decoded within second.

Is there a way how to repair such malfunctioning characters? The QR code is capable of encoding such characters.

MWE based on Alan Munn's answer:


\qrcode[]{í}% produces no error, resolved

\qrcode[]{š}% produces no error, unresolved

%Dummy text containing all the weird czech characters.
\qrcode[]{Příliš žluťoučký kůň úpěl ďábelské ódy}% Unresolvable


Resolvable dummy text generated by goqr.me containing the weird characters:
Příliš žluťoučký kůň úpěl ďábelské ódy

And same text encoded by MWE resulting in unresolvable code:
enter image description here


qrcode.tex says:

Non-ASCII characters

If you are using csplain with pdfTeX (no XeTeX, no LuaTeX) then UTF-8 input is correctly interpreted from \qrcode parameter.

The technical background: the encTeX's \mubyte is set to zero during scanning the \qrcode parameter, so the parameter is rawly UTF-8 encoded and this is correct for QR codes.


  1. You cannot use \qrcode{parameter} inside another macro, bacause UTF-8 encoded parameter is reencoded already.
  2. You cannot use XeTeX or LuaTeX because UTF-8 encoded parameter is reencoded to Unicode already. And the backward conversion from Unicode to UTF-8 isn't implemented here at macro level.

Both problems are in my particullar case unaviodable.

same code, except for a \usepackage{fontspec} line produces following result:

enter image description here

  • Is that the kind of thing that should be reported to the package maintainer, as a bug? After all, utf-8, luatex, and xetex have been around for awhile. – user139954 Apr 25 '18 at 21:38
  • @RobtAll the quote comes from the qrcode.tex located directly in package folder. I suppose mainainer is aware of such behaviour. – Crowley Apr 26 '18 at 8:30
  • Ah. That was obvious, but I missed it. The package should detect compiler and issue direct error. – user139954 Apr 26 '18 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.