What is wrong with this please? The error is:

! Package inputenc Error: Invalid UTF-8 byte sequence.See the inputenc package documentation for explanation.Type H <return> for immediate help.... printf "Vytvořen

\newtcbinputlisting[auto counter,list inside=lol,list type={lstlisting}]{\mylisting}[3][]{%
  listing file={#3},
  listing only,
  listing options={basicstyle=\scriptsize\ttfamily},
  title={Soubor \thetcbcounter: #2},
\mylisting[label=file]{Vytvoření 500 souborů \texttt{korel.res} výběrem z 65 spekter s opakováním}{files.txt}

I don't have LOG file enter image description here

  • Compiles withput errors on TeXLive 2019. Can you provide the log file as well?
    – daleif
    May 8, 2019 at 10:25
  • I have only files that I added to my question. I used MiKTeX May 8, 2019 at 10:35
  • 1
    You must have a log-file. Check the real extentions of every file in the folder (or configure windows so that it shows the endings). May 8, 2019 at 10:48
  • Possibly related: tex.stackexchange.com/questions/214828/…
    – user30471
    May 8, 2019 at 10:48
  • Be aware that copy& paste can change code, so it is quite possible that your tex file is actually 8bit encoded and we see utf8. Try if it compiles if you add \usepackage[ansinew]{inputenc}. May 8, 2019 at 10:50

1 Answer 1


Run the document with xelatex or lualatex:

enter image description here

  • It gives an error: ! LaTeX Error: Option clash for package inputenc.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... \begin in case of lualatex and when I use xelatex there is much more errors May 8, 2019 at 11:54
  • The document as posted even compiles fine with pdfLaTeX. Indeed the error message mentioning printf "Vytvořen, which is nowhere to be found in the shown .tex code makes me suspect the issue is hidden in file.txt.
    – moewe
    May 8, 2019 at 11:54
  • you do not need package inputenc! utf8 is already the default
    – user187802
    May 8, 2019 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .