The following MWE works fine when compiling with the LaTeX engine (AUCTeX 11.86)
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\begin{document}
áéíóúñ
\end{document}
However, with the XeTeX engine I get the following error:
ERROR: Package inputenc Error: Unicode char \u8:áéí not set up for use with LaTeX
--- TeX said ---
.
See the inputenc package documentation for explanation.
If I change the input encoding to Latin-1 the document compiles correctly. Why is XeTeX rejecting the UTF-8 encoding?
I tried the suggestions given in Typeset directly in Spanish and in AUCTeX and Xetex but neither help.