Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use 5.8.5 version of notepad++. The .tex file that I have edited on notepad++ could not be opened on gedit. The error I get is "character set could not be recognized"

share|improve this question
what charset does npp uses? default is ANSI, but you use an other? Try it with UTF-8... – antivirtel Dec 13 '10 at 8:03
I tried UTF-8, but the tex file refuses to compile. Then I tried with UTF-8 without BOM, but then strange, hex, characters appear in the document. – nixnotwin Dec 13 '10 at 10:06
up vote 2 down vote accepted

Two things to try (from the commandline):


fromdos filename.tex

(requires the tofrodos package).


iconv -c -f UTF-8 -t UTF-8 filename.tex > filename-copy.tex

That should remove any characters not compatible with UTF-8.

(You should also follow the advice in the other answer about putting \usepackage[utf8]{inputenc} in your .tex source.)

share|improve this answer

My latex files are all utf8 and compile on windows and on linux.

I would use UTF-8 without BOM

and add


in the main file to inform the pdflatex or latex command that the content is UTF8

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.