I'm writing a document in spanish language. Since I need to use spanish accents (for example "camión") the best encoding should be utf-8.
However, for some reason, when I compile the document (I'm using TeXnicCenter) I get a lot of errors. For example:
Package inputenc Error: Unicode char és) (U+45)
They occur just where the spanish accents are. Okay, I think the errors are because the .tex
file is in ANSI. I proved it opening the TeX, changing it to UTF8 without BOM (using NotePad++) and zero problems when trying to compile it.
So far, I have two possible solutions: the one I wrote above and just using ANSI (removing inputenc) and writing the accents using '\.
Both ways work but they are tedious. Is there any better solution?
UPDATED: Fast solution: just change the TeX Editor. I'm using now TeXmaker and all is ok. But anyway, maybe there is a solution to users who wants to still use TeXnicCenter so I leave it open if there is a better solution.
\usepackage[latin1]{inputenc}
(the fact that some accented characters accidentally work if you do not specify an encoding at all is an accident of the implementation details and should not be relied on)