Reputation: 13
I have a text that its wrong encoded, I need to replace all the lines where:
"<96> DASH <96>" appears
And change that line to "- DASH -"
<96> DASH <96>
¡Bah NC unknown
! FS !
<96> DASH <96>
exclamó VLfin exclamar
Olaf NP unknown
<96> DASH <96>
. FS .
Ahora ADV ahora
The three elements must be separated by tabs and a CR at the end
- DASH -
¡Bah NC unknown
! FS !
- DASH -
exclamó VLfin exclamar
Olaf NP unknown
- DASH -
. FS .
Ahora ADV ahora
Any advice?
Upvotes: 0
Views: 66
Reputation: 9445
Try this:
:%s/\%x96\s*DASH\s*\%x96/-\tDASH\t-/
The most important thing above is that \%x..
lets you search for an hexadecimal char code. The rest of the command may be modified to better fit your needs.
See :h /\%x
Upvotes: 2