# Keyboard character is undefined error

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

\documentclass[twocolumn]{article}

\usepackage[czech]{babel}
\usepackage[latin2]{inputenc}
\usepackage[T1]{fontenc}

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

\begin{document}
České vysoké učení technické v Praze
\end{document}


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.

-

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. – Grant May 24 '13 at 1:02
@Grant may I ask why is this so? – Gonzalo Medina May 24 '13 at 1:03
I'll be processing csv files that are in ISO-8859-2. – Grant May 24 '13 at 1:04
@Grant I see. Is your editor configured to also use ISO-8859-2? – Gonzalo Medina May 24 '13 at 1:05
I set it to ISO-8859-2, rewrote the sample and it started working. Thank you. – Grant May 24 '13 at 1:10

% !TEX encoding = UTF-8 Unicode

In LaTeX document? Till to now I was convinced that ones need to write \usepackage[utf8]{inputenc}` ... – Zarko 2 days ago