"A.J.Mechelynck" <[EMAIL PROTECTED]> 写于 2007-06-06 09:51:51: > Unicode files may or may not have a BOM, depending on who (or which program) > created them and where they come from. If you remove "ucs-2le" from your > 'fileencodings', but leave "ucs-bom" at the start, any Unicode fileshaving a > BOM will still be recognised and the proper encoding set. > > > Best regards, > Tony.
It seems that ucs-2le files with BOM will get recongized now. But I've got some other question: 1. will vim write BOM when writing to unicode files? or is there any options for that? 2. what is the correct way of converting a file encoding inside vim? I opened a file with cp936 encoding, then :set fenc=ucs-2le, then :w newfile.txt, close the vim and open the newfile.txt with a new vim, then I found everything in a mess. (gvim 7.1 winxp) -- Sincerely, Pan, Shi Zhu. ext: 2606