On Sun, 18 May 2008 11:10:53 +1000, "John Beckett"
<[EMAIL PROTECTED]> wrote:

> Adri Verhoef wrote:
> > I think there is a problem here, namely that the BOM (Byte 
> > Order Mark, see :help 'bomb') is transferred to the shell 
> > command, when it shouldn't.  In my opinion Vim should be able 
> > to temporarily remove the BOM, then execute the shell 
> > command, and finally place the BOM back at its original 
> > place, at the beginning of the file.
> 
> I can't follow the logic of that. If a BOM is requested, then it will be 
> inserted if
> the file is saved. Sending it to an external program requires that the file be
> saved, and the whole point of the BOM is to tell the external program what 
> encoding
> to use.

It's not quite that simple. I can't do any testing at the moment, but
what happens when a part of the file not including the first line of
the buffer is filtered through an external command? Should the BOM be
added to the start of the filtered text and removed afterwards?

I suppose it all depends on whether the BOM is considered to be part
of the buffer or part of the file.

-- 
Matthew Winn

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui