# Accentuation problem with some words

Well, I open a document .tex that uses this preamble:

``````\documentclass[a4paper,11pt,twoside]{report}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
``````

and the font codification is UTF-8. The problem is that some, just some, words are not accentuated, and in the place of the accent, a question mark like this �, appears. Here are some examples:

``````Word on the document (wrong)              correct word
n�mero                              número
Estat�sticas                      estatísticas
``````

Is there any way to solve this problem without having to rewrite all the words?

• Are you referring to the output generated when you compile the document, or the input contained within the `.tex` file when viewed in your editor? If it is the latter, which editor are you using? – Werner Nov 9 '11 at 0:44
• Could you copy and paste the words in question from your `.tex` file? If I compile a document with your preamble and the words taken from your "correct word" column, everything works fine. – Jake Nov 9 '11 at 0:44
• It seems that your editor is using an encoding different from `utf8` (the encoding of your document). Please make sure that both encodings are the same. – Gonzalo Medina Nov 9 '11 at 1:05
• @Werner I am referring to the .tex as a input; it was not generated by me. I'm using TeXMaker, by TexLive. – Rodrigo Thomas Nov 9 '11 at 2:10
• @Jake Well, as a matter of fact, the words that I pasted on the first column are from the .tex file. – Rodrigo Thomas Nov 9 '11 at 2:11

Before compiling your first document, you must set the encoding used by the editor ("Configure Texmaker" -> "Editor" -> "Editor Font Encoding"). Then, you should use the same encoding in the preamble of yours TeX documents (example: `\usepackage[latin]{inputenc}`, if you use the "ISO-8859-1" encoding for the editor).
• @Rodrigo: there's a command line program called `iconv` which converts text from one encoding to another encoding. It might be useful for a batch of files. `:)` – Paulo Cereda Nov 9 '11 at 10:10