1

I believe I have changed the encoding of a file I created(not sure), and when I changed it back to UTC-8 it left some invisible spaces. In between letters I need to press the backspace multiple times in order to delete a letter. When I Typeset I get this message for all words basically:

Textline contains invalid character e@^^m^^@g^^@l.. and goes on and on with @^^ in between letters. Is there any way I can delete all of them?

My other solution is a painful RE-write of the whole paper which is going to take at least 3-4 hours.

1
  • 2
    These are not “invisible spaces”, but null bytes. Try selecting one of them (place the cursor after one of them and do “Shift-leftarrow”, then “Command-C”); then paste the result in the “Find and replace” box and replace with nothing.
    – egreg
    Commented Dec 19, 2018 at 10:43

1 Answer 1

1

The characters are not “invisible spaces”, but rather “null bytes”.

They can appear if somehow a document is switched to UTF-16 because in this case null bytes are added next to eight bit characters to go to sixteen bit.

You can remove them by selecting one of them.

Identify one of them (when doing backspace seems to do nothing), hit Command-Z to reinsert it, do Shift-Left Arrow to select the rogue character and hit Command-C to copy it in the Clipboard. Open the Find… dialog box, do Command-V to paste the rogue character in the “Find” box; ensure nothing is present in the “Replace with” box and do “Replace all”.

1
  • Worked perfectly! Commented Dec 19, 2018 at 11:18

You must log in to answer this question.

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