On Mon, 19 Oct 2009, pansz wrote:
> 
> Tony Mechelynck 写道:
> > - If you want one particular file to be recognized as UTF-8 not only by 
> > Vim but also by other programs (let's say by other Windows editors such 
> > as WordPad; or by browsers if the files are in HTML, CSS or even 
> > plaintext) it helps if you use ":setlocal bomb" (or maybe ":setlocal 
> > fenc=utf-8 bomb") before saving the file. Note that the BOM consists of 
> > bytes with the high bit set, so the following paragraph never applies to 
> > 
> > Best regards,
> > Tony.
> 
> Note this does not work if you're programmer. utf-8 files should *not* 
> contain the BOM, otherwise, it may not compile with gcc.
> 

It may work in windows, unicode saved from notepad contains bom. I
suspect BOM also work in visual studio, but I'm not familiar with
window programming environment.

That being said, I suppose it is safe to speculate everyone use utf8
for unicode in linux and no one use bom for utf8.  Java originally use
ucs2 as default, but not sure for now, as I never use java.

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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

Reply via email to