Ubuntu: Error while opening tex files in gedit


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"


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


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

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »