[Tex/LaTex] Package inputenc Error: Unicode char \u8:ónpr not set up for use with LaTeX

spanishtexstudiounicode

I recently changed from texmaker to texstudio and i'm facing this ugly problem that doesn't leave to split my text into several files. Here's my main file:

\documentclass{article}

\usepackage[spanish,es-noquoting, es-tabla, es-lcroman]{babel} 
\usepackage[utf8]{inputenc}                                    
\selectlanguage{spanish}                                      

\begin{document}
 Extensión producto
\end{document}

I'm getting the error:

Package inputenc Error: Unicode char \u8:ónpr not set up for use with
LaTeX Extensión pr

Does anybody know why this happens?

Best Answer

If you save your test file in UTF-8 encoding then it will run without error. If you save it in latin1 (iso-8859-1) you get the error

! Package inputenc Error: Unicode char ónpr (U+153)
(inputenc)                not set up for use with LaTeX.

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

l.8 Extensión pr
                oducto
?

with current latex, or the slightly less readable but equivalent error message that you showed, on older versions of LaTeX.

So you can re-encode your file by saving it in utf-8 or declare to latex that it is in latin1 by changing the line to

\usepackage[latin1]{inputenc}