Yesterday a failed USB extraction damaged an important .tex file for me, I attached the file in a Dropbox link.

When I try to open the .tex in Texmaker a message suddenly appears that says something like "the encoding is wrong", and on the screen strange symbols appear, like:

<^üøzÖWÿòY÷ÓïßcRøhão3£O¼+F×^>õ¾ûÛo0¿ô¿Lò/q  ½ûð=dúóßKtxÇïÏì^®ËÙëßÿx÷áÃÓÌååª<¸<ýûß># '¿ðrcþÛ¿9æôðr}1Ö

It is a frustration, because it is the work of many weeks, I know that it is my fault, but I dont know what I have to do, I am desperated, I tried a lot of things:

  • to recover it using the .bak file, but it is very old.
  • to open in diferents text editors, like Emacs, Notepad++, and others.
  • to change the codification in bash (I use MATE 1.12.1 in my laptop).

Of course I did all of this experiments with a copy of the file.

1 Answer 1


The file is a (truncated) synctex gzipped file, not your source.

If you rename it it to a.gz and unzip you see

SyncTeX Version:1
  • Thanks for your rapid answer, but i dont understand what you mean with : "The file is a (truncated) synctex gzipped file, not your source." . And when I rename the file to a.gz and I unzip the file in the bash the result is : $ gzip -dv a.gz a.gz: gzip: a.gz: unexpected end of file Jun 28, 2017 at 9:57
  • yes it's truncated so gunzip will reject it but if you use zcat or similar it will stream the first part of the file before it gives the error so you will see the decoded contents that I showed. one of the "extra" files tex can write when running is a xxx.synctex.gz file, this just has coordinate data so you can click on the pdf preview and jump back to your source. This xxx.synctex.gz file has for some reason been written over the xxx.tex source. @MiguelMolinos Jun 28, 2017 at 10:02
  • @MiguelMolinos if you do not have zcat try gzip -dc a.gz that works for me Jun 28, 2017 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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