The accented Portuguese characters work well when compiled with pdflatex but not with xelatex giving an inputenc error. Why?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage[T1]{fontenc}
\author{Sérgio}
\title{Há muito açafrão}
\begin{document}
\maketitle
Words/letters with accents: Sérgio áéíóúçãõ.
\end{document}