TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. 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

What do I do if my tex file now looks like:

^@\^@d^@o^@c^@u^@m^@e^@n^@t^@c^@l^@a^@s^@s^@[^@1^@1^@p^@t^@]^@{^@a^@r^@t^@i^@c^@l^     @e^@}^@
   2 ^@ 
   3 ^@\^@u^@s^@e^@p^@a^@c^@k^@a^@g^@e^@{^@a^@m^@s^@m^@a^@t^@h^@,^@ ^@a^@m^@s^@s^@y^@m^     @b^@,^@ ^@e^@u^@c^@a^@l^@,^@ ^@y^@f^@o^@n^@t^@s^@,^@ ^@s^@e^@t^@s^@p^@a^@c^@e^@,^@      ^@s^@e^@c^@t^@s^@t^@y^@,^@ ^@e^@n^@u^@m^@i^@t^@e^@m^@,^@ ^@a^@m^@s^@c^@d^@,^@ ^@
   4 ^@ ^@ ^@w^@a^@s^@y^@s^@y^@m^@,^@ ^@c^@a^@p^@t^@i^@o^@n^@,^@ ^@t^@i^@k^@z^@,^@ ^@t^     @i^@k^@z^@-^@q^@t^@r^@e^@e^@,^@ ^@m^@a^@t^@h^@t^@o^@o^@l^@s^@,^@ ^@i^@n^@c^@o^@n^@     s^@o^@l^@a^@t^@a^@,^@ ^@p^@g^@f^@p^@l^@o^@t^@s^@,^@ ^@
   5 ^@ ^@ ^@t^@i^@k^@z^@-^@3^@d^@p^@l^@o^@t^@,^@ ^@f^@l^@o^@a^@t^@,^@ ^@w^@r^@a^@p^@f^     @i^@g^@,^@ ^@m^@u^@l^@t^@i^@r^@o^@w^@,^@ ^
share|improve this question

closed as off topic by zeroth, Werner, diabonas, Claudio Fiandrino, Herbert Apr 8 '13 at 16:27

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I believe the word is 'panic.' – Sean Allred Apr 8 '13 at 15:16
Actually, it looks like the text is all there, but each character is prepended with ^@, some kind of control character (my guess a jump from a 16-bit encoding to n 8-bit encoding). Was this sent to you by someone else? – Sean Allred Apr 8 '13 at 15:18
Find and replace ^@ by nothing, or use the restore command from your verison control (or backup) system. – Caramdir Apr 8 '13 at 15:19
@SeanAllred how I do fix this? – dustin Apr 8 '13 at 15:19
@Caramdir if such a system is even in place. Try to use vim to open it up in UTF-16 from the get-go; I use Emacs, so the best I could give you is a Google search. – Sean Allred Apr 8 '13 at 15:20

It has been saved as utf-16 and so every other byte is 0 (often displayed as ^@ as @ has code 64 so zero is control-@)

The only thing I know about vim is that it isn't emacs but in chat my backup vim expert suggests

:set fileencoding=utf-8
:set encoding=utf-8
share|improve this answer
@Dacid Carlisle so how do I fix this? – dustin Apr 8 '13 at 15:19
Do you know how to have vim open it up in UTF-16 from the get-go? – Sean Allred Apr 8 '13 at 15:19
iconv -f UTF-16 -t UTF-8 -o output.tex file.tex should work – Caramdir Apr 8 '13 at 15:22
@dustin: yes. You can test David's suspicion with file /the/tex/file.tex first (assuming you are on Linux). – Caramdir Apr 8 '13 at 15:27
@dustin: I think we need to know what OS you are using. If you can run the CLI program "hexdump" (or some other byte-oriented file-contents display program - Emacs has one built in, of course) then hexdump -C file.tex will show you whether each other character is 00. – Charles Stewart Apr 9 '13 at 7:11

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