I'm trying to compile a simple ISO-8859-2 document,



\usepackage[paperwidth=18cm, paperheight=13cm]{geometry}

České vysoké učení technické v Praze

The compilation fails at the "č" letters. It keeps saying

! Package inputenc Error: Keyboard character used is undefined
(inputenc) in inputencoding `latin2'.

despite the fact that "č" is a latin2 character.

2 Answers 2


There seems to be a conflict between the encoding used in your document and the one of your editor. Both encodings: the one declared in your document using inputenc and the one used for your editor need to be the same; otherwise errors will appear. Make sure both coincide and the problem will disappear.

  • Thanks for your answer, but the use of latin2 is mandatory in my project.
    – user27510
    Commented May 24, 2013 at 1:02
  • @Grant may I ask why is this so? Commented May 24, 2013 at 1:03
  • I'll be processing csv files that are in ISO-8859-2.
    – user27510
    Commented May 24, 2013 at 1:04
  • 1
    @Grant I see. Is your editor configured to also use ISO-8859-2? Commented May 24, 2013 at 1:05
  • I set it to ISO-8859-2, rewrote the sample and it started working. Thank you.
    – user27510
    Commented May 24, 2013 at 1:10


% !TEX encoding = UTF-8 Unicode

at the beginning of your document. It works for me.

  • 2
    Hello and welcome to TeX.SE! I'm afraid that the fact it works for you does not mean it answers the posted question. I'm actually 100% sure it does not, since the code in the question requires latin1 encoding, and you'd be supplying utf8 to it.
    – yo'
    Commented May 1, 2016 at 12:11
  • 1
    In LaTeX document? Till to now I was convinced that ones need to write \usepackage[utf8]{inputenc} ...
    – Zarko
    Commented May 1, 2016 at 12:34

You must log in to answer this question.