To Thesis.tex (of Sunil Patel's Thesis Template.zip) I added these two lines (to allow for German special characters):

\usepackage[utf8]{inputenc} % my edit
\usepackage[T1]{fontenc} % my edit

in the

% Include any extra LaTeX packages required

section, tried to compile ("Run" in Texmaker, "Compile" in Kile) and received the following error message a number of times:

! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.

I read (somewhere on this site, can't find the link again just now) that it might help to switch the order around,

\usepackage[T1]{fontenc} % my edit
\usepackage[utf8]{inputenc} % my edit

so I did, more or less with the same result(s). Ulrike Fischer wrote something about it, but frankly I don't get its import; translation(s) welcome! Is Ulrike basically saying that I can happily ignore both the order and the error message?

Another thing which popped up is this message (in Texmaker):

enter image description here

... so maybe all it takes is to change Thesis.tex from ISO-8859-1 to UTF-8 ? Or would I need to change the encoding of other files (contained in the *.zip), as well? Anyway, I tried changing Thesis.tex to UTF-8, compiled, closed; re-opened; again it's back to ISO-8859-1 :( Going in circles...


Now I'm trying to use these lines instead


Maybe that will do the trick?

It would be so much a great help (to me as a beginner, who's only read/skimmed two LaTeX books so far (a while ago), but didn't get his hands dirty for real yet) if someone could look at the *.zip contents and let me know how to do it right.

Some related Q&A's, which are too technical for me at this point in time:

Error: Unicode char \u8:φ not set up for use with LaTeX

fontenc vs inputenc

Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX

Moving from pdfLaTeX to XeTeX - what do I need to know?

Would anyone recommend me to switch from pdfLaTeX to a different compiler, at this beginners' stage of mine? For now, I'm only interested in writing a short thesis with one or two tables, bibliography, etc; nothing more exotic than that.

PS: If you happen to know of an alternative template which looks pretty similar to Sunil's and is already compatible with the German umlauts, please do let me know.

  • Yes, it would be a good idea to add to your question the exact text of the relevant error message(s), Mar 23, 2013 at 22:28
  • sample input document and exact error would help but firstly are you sure that your document is saved as utf-8 rather than latin1 (iso-8859-1) Mar 23, 2013 at 22:29
  • also, there's a Thesis.cls file -- would I need to add the uf8 line there, too (generally speaking)? Mar 23, 2013 at 22:34
  • No idea about that editor, if you have changed your default you can probably save the document to a new file in the default encoding, otherwise make the smallest document that makes an error (5 or6 lines should be enough) and post it into your question with the exact error message. Mar 23, 2013 at 22:35
  • 1
    Almost all class (.cls) and package (.sty) files are written just using ascii so they work with any encoding. Mar 23, 2013 at 22:36

2 Answers 2


Apologies in advance; This answer is unfortunately all shell and no TeX.

It seems that you are running some form of *NIX, so you could try and see what the encoding of the file is with

file file.tex

Chances are that the file is in one of the ISO-8859-* encodings, and if so, the file command, AFAIK, cannot tell which part of the standard it is. After consulting the previously linked wikipedia page, you can make a guess (and appreciate Unicode even more).

If you would like to convert the encoding to UTF-8, you could use

iconv --from-code=ISO-8859-n --to-code=UTF-8 file.tex > file-utf8.tex

where n could be 1 or 15, for example. The input conversion is printed to standard output, so the > redirection tells to redirect to a file file-utf8.tex instead.

  • Indeed, I'm on Ubuntu Precise. I'm still guessworking my way through: I dropped utf8, trying latin1 instead; opened Chapter1.tex, Thesis.tex and Thesis.cls in gedit and did Save as ... and hand-picked ISO-8859-1; am not sure if that was sth logical or sensible or systematic to do; not sure if I should do the same with other files, should I? I think what I did kind of worked, as I've got umlauts in the pdf now, no error messages. But it feels a bit haphazard n dirty... Do you think what I did was good (enough) ? Mar 24, 2013 at 9:48
  • ps: in Texmaker I also changed the default encoding to ISO-8859-1. Mar 24, 2013 at 9:55
  • @nuttyaboutnatty: Well, I think that everything should be in Unicode. But see Davids comment earlier; you shouldn't need to change the encoding of class-files.
    – morbusg
    Mar 24, 2013 at 9:59
  • I hope I'm slowly catching on, thanks for bearing with me! So would you suggest me to roll back and manually do the Save as... procedure with gedit (not elegant, but as long as it gets the job done...) and make sure Chapter1.tex and Thesis.tex are utf8? So I would only need to change the encoding of those two files? Mar 24, 2013 at 10:04
  • did that, worked too; I think I got it now... Mar 24, 2013 at 10:18

I definitely recommend changing the engine to XeTeX or LuaTeX. You still need to convert the files from latinX to utf8, but with nearly any editor in ubuntu, that shouldn't be a problem. From there on, you can forget about the packages inputenc and fontenc. If you need some other font (which you probably do, as you want to include German Umlaute), use the fontspec package and it's simple \setmainfont{<fontname>} command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .