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
- 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:
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
selinput would only find a matching encoding that was used by the class writer.