[Tex/LaTex] Package inputenc Error: Keyboard character used is undefined – ^^c0


I have a very large LaTeX document which can't be compiled because of following error:

Package inputenc Er
ror: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8'.

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

l.1398 \ifcat ^^c0
                  \active \pdf@activecharstrue\fi 

The problem is, I'm not able to find the problematic symbol, because of the document's size.

I wanted to "replace" the character with something different like this


But it doesn't work. Am I doing something wrong or this character simply can't be replaced? Or do you have any other tip how to find the mistake?

I'm using pdflatex.

I've read several other questions, but I've not been able to solve this anyway:


It's this document – I've deleted almost all the text in main.tex and it's still not working…


Ok, the problem is obviously caused by pdfx package. I've tried to move it before inputenc include like this

\RequirePackage[latin1, utf8]{inputenc},

but now it gives me another error:

LaTeX Error: Comm
and \maketitle already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.235 }

Best Answer

The class file diploma.cls is not well written.

Packages should generally be loaded after \LoadClass. You can just move the \LoadClass declaration at the top. Also pdfx should be loaded before inputenc.

\def\docdate{20. června 2016}
\ProvidesClass{diploma}[\filedate\space \fileversion\space diploma EXPERIMENTAL LaTeX document class]

I don't think the latin1 option to inputenc does anything good. Actually, the package should be loaded in the document and not by the class.

Related Question