This question already has an answer here:

When trying to compile the following document with xelatex:






I get this error (sorry for the long paste):

This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, et
hiopic, farsi, arabic, pinyin, croatian, bulgarian, ukrainian, russian, slovak,
 czech, danish, dutch, usenglishmax, ukenglish, finnish, french, basque, ngerma
n, german, swissgerman, ngerman-x-2012-05-30, german-x-2012-05-30, monogreek, g
reek, ibycus, ancientgreek, hungarian, bengali, tamil, hindi, telugu, gujarati,
 sanskrit, malayalam, kannada, assamese, marathi, oriya, panjabi, italian, lati
n, latvian, lithuanian, mongolian, mongolianlmc, nynorsk, bokmal, indonesian, e
speranto, coptic, welsh, irish, interlingua, serbian, serbianc, slovenian, friu
lan, romansh, estonian, romanian, armenian, uppersorbian, turkish, afrikaans, i
celandic, kurmanji, polish, portuguese, galician, catalan, spanish, swedish, th
ai, loaded.
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def))) (./umlauts.aux)

! Package inputenc Error: Unicode char \u8:äöü not set up for use with LaTeX

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.

l.9 äöü

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

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.

l.9 äöüÄÖ
Runaway argument?
! Paragraph ended before \UTFviii@two@octets was complete.
<to be read again> 

(./umlauts.aux) )
No pages of output.
Transcript written on umlauts.log.

But the file is in utf-8 encoded:

$ file -i umlauts.tex
umlauts.tex: text/x-tex; charset=utf-8

I cannot understand what I am doing wrong. Is my latex broken? I am using Texlive from the Ubuntu 12.10 repos.

marked as duplicate by egreg, Werner, Mensch, mafp, Stefan Kottwitz Apr 12 '13 at 22:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Your code compiles with pdflatex, though. Please see tex.stackexchange.com/questions/2984/… – krlmlr Mar 10 '13 at 20:18
  • 1
    The most voted answer in the question linked by @krlmlr says clearly that inputenc should not be used when processing with XeLaTeX. On the other hand, T1 encoded fonts may print the wrong glyph for non ASCII characters. So either use fontspec and OpenType fonts, or don't use XeLaTeX with that file. – egreg Mar 10 '13 at 21:26
  • The comment by @egreg solves the problem. Results look fine if I remove inputenc and fontenc from the preamble. – verstexnix Mar 13 '13 at 21:31

Myself, I use


Perhaps that will work for you too? (That said, I use pdflatex rather than XeTeX...)

  • 1
    Indeed. No amount of fiddling with options to inputenc and fontenc will fix this problem. – kahen Mar 10 '13 at 20:21
  • In fact, this is distinctly bad practice or maybe even harmful when using XeLaTeX. – doncherry Apr 12 '13 at 23:27
  • +1 No idea if it's bad in XeLaTex, but worked for me in LaTex! – Oriol Nov 17 '13 at 20:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.