Re: UTF-8 bomb showing up after :%!sort

2008-05-21 Fir de Conversatie Tony Mechelynck
On 21/05/08 07:53, Yakov Lerner wrote: On Mon, May 19, 2008 at 11:01 PM, Bram Moolenaar[EMAIL PROTECTED] wrote: :se fileencoding=utf8 bomb :%!sort The problem is with using an encoding that the sort command doesn't understand [utf8] Maybe sort does understand utf8 (gnu sort

Re: UTF-8 bomb showing up after :%!sort

2008-05-20 Fir de Conversatie Nikolai Weibull
On Sun, May 18, 2008 at 8:44 PM, Tony Mechelynck [EMAIL PROTECTED] wrote: Note, that you probably do not want to use BOM with UTF-8. See http://unicode.org/faq/utf_bom.html#29 (Q: Can a UTF-8 data stream contain the BOM character (in UTF-8 form)? If yes, then can I still assume the remaining

Re: UTF-8 bomb showing up after :%!sort

2008-05-20 Fir de Conversatie Mike Williams
On 20/05/2008 12:06, Tony Mechelynck wrote: On 19/05/08 23:01, Bram Moolenaar wrote: [...] I'm not sure if Vim should detect (and remove) a BOM halfway a file. You can get it with some filter commands and concatenating files. Perhaps we need a command :delboms? And :delbombs for people who

Re: UTF-8 bomb showing up after :%!sort

2008-05-20 Fir de Conversatie Tony Mechelynck
On 20/05/08 15:22, Mike Williams wrote: On 20/05/2008 12:06, Tony Mechelynck wrote: On 19/05/08 23:01, Bram Moolenaar wrote: [...] I'm not sure if Vim should detect (and remove) a BOM halfway a file. You can get it with some filter commands and concatenating files. Perhaps we need a command

Re: UTF-8 bomb showing up after :%!sort

2008-05-20 Fir de Conversatie Nikolai Weibull
On Tue, May 20, 2008 at 12:47 PM, Tony Mechelynck [EMAIL PROTECTED] wrote: On 20/05/08 09:11, Nikolai Weibull wrote: On Sun, May 18, 2008 at 8:44 PM, Tony Mechelynck [EMAIL PROTECTED] wrote: Note, that you probably do not want to use BOM with UTF-8. See

Re: UTF-8 bomb showing up after :%!sort

2008-05-20 Fir de Conversatie Yakov Lerner
On Mon, May 19, 2008 at 11:01 PM, Bram Moolenaar [EMAIL PROTECTED] wrote: :se fileencoding=utf8 bomb :%!sort The problem is with using an encoding that the sort command doesn't understand [utf8] Maybe sort does understand utf8 (gnu sort definitely does), but vim does not

Re: UTF-8 bomb showing up after :%!sort

2008-05-19 Fir de Conversatie Bram Moolenaar
Adri Verhoef wrote: I have this textfile that contains three lines: 3 2 1 Now do: :se fileencoding=3Dutf8 bomb :%!sort Result: 1 2 feff3 Now do: :w newfile newfile [New] 3L, 12C written :w !od -c=20

Re: UTF-8 bomb showing up after :%!sort

2008-05-18 Fir de Conversatie Matthew Winn
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

Re: UTF-8 bomb showing up after :%!sort

2008-05-18 Fir de Conversatie Ben Schmidt
Matthew Winn wrote: 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

Re: UTF-8 bomb showing up after :%!sort

2008-05-18 Fir de Conversatie Ilya Bobir
Adri Verhoef wrote: [...] Now do: :se fileencoding=utf8 bomb [...] Note, that you probably do not want to use BOM with UTF-8. See http://unicode.org/faq/utf_bom.html#29 (Q: Can a UTF-8 data stream contain the BOM character (in UTF-8 form)? If yes, then can I still assume the

Re: UTF-8 bomb showing up after :%!sort

2008-05-18 Fir de Conversatie Tony Mechelynck
On 18/05/08 18:41, Ilya Bobir wrote: Adri Verhoef wrote: [...] Now do: :se fileencoding=utf8 bomb [...] Note, that you probably do not want to use BOM with UTF-8. See http://unicode.org/faq/utf_bom.html#29 (Q: Can a UTF-8 data stream contain the BOM character (in UTF-8 form)? If

UTF-8 bomb showing up after :%!sort

2008-05-17 Fir de Conversatie Adri Verhoef
I have this textfile that contains three lines: 3 2 1 Now do: :se fileencoding=utf8 bomb :%!sort Result: 1 2 feff3 Now do: :w newfile newfile [New] 3L, 12C written :w !od -c 000 357 273 277

RE: UTF-8 bomb showing up after :%!sort

2008-05-17 Fir de Conversatie John Beckett
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