The input encoding depends on the editor that is used to write the TeX file:
A good editor is not limited to one encoding, the user can configure the encoding among many different encodings.
Even if the system encoding is used, this is not stable either, different systems use different encodings. Also the default encoding of the system can be changed.
A class file does not know, where it will be used, which editors with which encodings the users might use, the specification of the input encoding does not belong to the class file. It can only offer some help:
- Documentation that describes, what the user can do to specify the input
encoding.
- The class could provide a class option (
inputencoding=...) that passes the value of the option to package inputenc. A default value might be set that the most users might use. (Key value options can be supported by some packages, kvoptions, for example).
If the user is troubled to find the right encoding, then package selinput can help, the example from its documentation:
\documentclass{article}
\usepackage{selinput}
\SelectInputMappings{
adieresis={ä},
germandbls={ß},
Euro={€},
}
\begin{document}
Umlauts: ÄÖÜäöüß
\end{document}
Then the package analyzes the specifications of \SelectInputMappings to find a matching encoding automatically. However, this cannot be done in a class file, because it must be written with the same editor as the text after \begin{document}. Otherwise selinput would only find a matching encoding that was used by the class writer.
inputencyou use in your example. To display Umlauts properly I use\usepackage[T1]{fontenc}this is necessary because the LaTeX standard font isn't able to display them correctly (someone please correct me if I'm wrong here) – Rico May 23 '13 at 10:06cross-platform(win,unix and mac)Unicode:yesLaTeX Editors/IDEs and recommend the same to colleagues. See Martin Schröder's forpdflatexengine fontenc vs inputenc answer – texenthusiast May 23 '13 at 10:15