Monday, January 25, 2016

Re: editing a _corrupted_ CP1252 file

On 25.01.16 11:18, Kenneth Reid Beesley wrote:
> I know that the files are _supposed_ to be CP1252.
> But beforehand I don't if or how they are corrupted. Usually the
> problem in a corrupted file is the presence of \x81, \x8D, \x8F, \x90
> and/or \x9D bytes, which are illegal/undefined bytes in CP1252. The
> files are programs, so I need to zero in on each invalid byte
> (invalid for CP1252), figure what's going on, and edit it
> appropriately. So it needs to be done by hand. (There are not a lot
> of such bad characters.)

Ah, not simply remapping, then. For UTF-8, Vim has the "8g8" command, to
hop to the next encoding violation. Unfortunately, there's no mention
there of any ability to do that for CP1252.

What happens if you have fenc=utf-8, open the cp1252 file, and press 8g8 ?

Erik

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: