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


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?

  • 1
    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
    Commented Nov 9, 2011 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
    Commented Nov 9, 2011 at 0:44
  • 1
    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. Commented Nov 9, 2011 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. Commented Nov 9, 2011 at 2:10
  • @Jake Well, as a matter of fact, the words that I pasted on the first column are from the .tex file. Commented Nov 9, 2011 at 2:11

1 Answer 1


Texmaker (or any editor for that matter) should be configured in order to render the correct input, as well as the corresponding output. The following is taken from the Texmaker documentation:

1.1 Configuring the editor

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).

Note: while opening a file, you're warned if the document can't be decoded correctly with the default encoding and the program lets you choose an other encoding (without modifying the default encoding).

  • Thank you @Werner! Is the any way to convert a .tex file between encondings, or a encoding that accept more than one style os characters? Daily I use UTF8. Commented Nov 9, 2011 at 2:48
  • 1
    I am not very familiar with input encodings, since I use TeXnicCenter that doesn't provide that functionality.
    – Werner
    Commented Nov 9, 2011 at 2:52
  • 1
    As a matter of information, if the operational system used is ubuntu, the gedit can be used to convert between encodings; its just "save as" the document, and then choose the encoding. Commented Nov 9, 2011 at 3:03
  • 1
    @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. :) Commented Nov 9, 2011 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .