# Listing - invalid UTF-8

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

\documentclass[12pt,a4paper]{report}
\usepackage[czech]{babel}
\usepackage{lmodern}
\usepackage{xcolor,colortbl}
\usepackage[most]{tcolorbox}
\newtcbinputlisting[auto counter,list inside=lol,list type={lstlisting}]{\mylisting}[3][]{%
listing file={#3},
title=Listing,
colback=white,
colframe=gray!75!black,
fonttitle=\bfseries,
listing only,
breakable,
listing options={basicstyle=\scriptsize\ttfamily},
title={Soubor \thetcbcounter: #2},
#1
}
\newcommand{\listingsfont}{basicstyle=\ttfamily}
\begin{document}
\mylisting[label=file]{Vytvoření 500 souborů \texttt{korel.res} výběrem z 65 spekter s opakováním}{files.txt}
\end{document}


I don't have LOG file

• Compiles withput errors on TeXLive 2019. Can you provide the log file as well? May 8 '19 at 10:25
• I have only files that I added to my question. I used MiKTeX May 8 '19 at 10:35
• 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 '19 at 10:48
• Possibly related: tex.stackexchange.com/questions/214828/…
– user30471
May 8 '19 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 '19 at 10:50

Run the document with xelatex or lualatex:
• 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 '19 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. May 8 '19 at 11:54
• you do not need package inputenc! utf8 is already the default May 8 '19 at 11:55