I have some files that are corrupted with this symbol:
^@
It's not part of the string; it's not searchable. How do I substitute this symbol with nothing, or how do I delete this symbol?
Here is an example line from one file:
^@F^@i^@l^@e^@n^@a^@m^@e^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@:^@ ^@^M^@
Answer
You could try:
%s/
(on regular PCs)//g %s/
(on Mac PCs)//g
where
means first press down the CTRL on regular PCs, keeping it as pressed down, hit 2, release CTRL.
and
means first press down the control on Mac PCs, keeping it as pressed down, press down shift on Mac PCs, keeping it as pressed down, hit 2, release control and shift.
Finally, both of the two commands should result in %s/^@//g
on screen. ^@
means a single character (a NULL byte, which otherwise couldn’t be displayed), not ^
followed by @
, so you can't just type ^
and @
in a row in the above command.
This command removes all the ^@
.
No comments:
Post a Comment