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

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?

• Are you sure your file was utf8 encoded? – Bernard Oct 4 '17 at 20:04
• the form of the error you show means that you have an old latex, and that your file is not in UTF-8 encoding but you have specified \usepackage[utf8]{inputenc} – David Carlisle Oct 4 '17 at 20:09
• I can reproduce the exact error if I encode the input as Latin-1, but process it as you do with the utf8 option to inputenc. – egreg Oct 4 '17 at 20:10
• @egreg and use a two year old inputenc, presumably. – David Carlisle Oct 4 '17 at 20:12
• @DavidCarlisle Yes, but the bulk of the error message was the same – egreg Oct 4 '17 at 20:17

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}

• sorry but in fact the file is saved with utf8 (i checked it on the texstudio settings) and still i have the same problem. in fact with the bigger text that originated the error i get a warning "data encoding is utf8" – Rodrigo Oct 4 '17 at 20:40
• @Rodrigo no your main file may be utf8 but the file that has that text is not, the bytes shown in the error message match the latin1 encoding of that text. – David Carlisle Oct 4 '17 at 21:02