# Package inputenc Error: Unicode char \u8:�\expandafter not set up for use wit h LaTeX

I'm having problem with generating pdf file from my tex file. When I use \documentclass with draft option, it generates pdf file with images as boxes without errors, so it's fine. But when I change that to final, I get following error almost on every space sign. Error:

Package inputenc Error: Unicode char \u8:�\expandafter not set up for use wit
h LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
...

l.206 \caption{Upravený
graf spoločnosti Apple Inc.}


Another Error:

! Package inputenc Error: Unicode char \u8:�\expandafter not set up for use wit
h LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
...

l.206 \caption{Upravený graf spoločnosti
Apple Inc.}


I'm writing my document in Slovak. This is my header:

%\documentclass[12pt,oneside, draft]{fithesis2}
\documentclass[12pt,oneside, final]{fithesis2}
\usepackage[czech, slovak]{babel}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage[plainpages=false,pdfpagelabels,unicode]{hyperref}
\usepackage{url}
\usepackage{graphicx}

\DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.mps}


I have tried changing utf8 package to utf8x - no success. I use Texmaker and editor font encoding is set to utf-8. I thought there was an extra invisible character. I retyped that sentence again but same error appeared. After writing it with english keyboard without special slovak chars, it showed next error(so I guess it was ok). I've spent hours googling this errors and thinking what might be wrong. No luck. This is my first experience with latex by the way.

//edit//

I had this in my tex file.

... metóda \begin{lstlisting}add_gaps_to_graph_default(...)\end{lstlisting}, ktorá. ...


I changed it to:

... metóda add\_gaps\_to\_graph\_default(...),


I thought lstlisting was something similar to verbatim. It successfully generates pdf file now. Thanks for MWE suggestion Steven! I'm a bit surprised error was not showing proper line. I guess I need to look at preceding lines in future as well.

• Welcome to the site. You've provided quite a bit of information about the problem, which is good. What would be better is if you could create a minimum working example (MWE) that starts with \documentclass and ends with \end{document} that demonstrates the problem. It makes debugging easier for the people trying to help you. – Steven B. Segletes Dec 5 '13 at 17:46

... metóda \begin{lstlisting}add_gaps_to_graph_default(...)\end{lstlisting}, ktorá. ...

... metóda add\_gaps\_to\_graph\_default(...),

I thought lstlisting was something similar to verbatim. It successfully generates pdf file now. Thanks for MWE suggestion Steven! I'm a bit surprised error was not showing proper line. I guess I need to look at preceding lines in future as well.