Accents in TeXworks

I am using TeXworks to write documents, but as I am doing some stuff in spanish, accents are required. When I write

áéíóú


I get

Ã¡Ã c


If I do \'a \'e \'i \'o \'u I get the desired result áéíóú

I have changed in Edit->preferences->Editor->Coding->ISO-8859-1 instead of UTF-8 but get the same results.

-
you are missing a \usepackage[utf8]{inputenc} in your document –  Herbert Oct 24 '11 at 16:19

You have to load the package inputenc with the current encoding or the package selinput.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
áéíóú
\end{document}


Example with selinput

\documentclass{article}
\usepackage{selinput}
\SelectInputMappings{