On Tue, 11 Apr 2006, Yakov Lerner wrote: > > Date: Fri, 7 Apr 2006 12:08:23 +0100 (WEST) > > From: Hugh Sasse <[EMAIL PROTECTED]> > > To: Vim Help list <vim@vim.org> > > Subject: editing WinXP text files - multibyte? > > > > If, on WinXP, I do > > > > regedit /e regfile.reg > > > > I get a file with the contents of the registry. However, in my Gvim > > (6.4) I see nulls for every other character (^@), which agrees with > > remarks about ucs-2le in the docs. This is particularly > > unpleasant to read and edit. Notepad will display it to read, but > > for editing I'd rather use gvim. Both > > :he utf-16 | he ucs2-le > > turn up nothing, and the utf-8 things don't seem relevant. :he > > encoding tells me I can't use that to edit a file that has loaded > > incorrectly, so I'll have to re-open the file. But that means > > right-clicking the file to access vim won't work. > > I think you need to set option 'fileencodings' properly in set fileencodings+=utf-8,utf-16,ucs-2le set fileencoding=ucs-2le set bomb
and trying set fileencoding=utf-16 set fileencoding=ucs-bom seems to make no difference:- set fenc? always tells me it is blank and set fileencodings+="utf-8,utf-16,ucs-2le" set fileencoding=ucs-2le doesn't help either, nor does removing the + and putting "ucs-bom" in there explicitly. So I'm still puzzled.... > your vimrc (:he 'fileencodings'). The option 'bomb' > (:he 'bomb') might be relevant, too. I am not specialist in > encodings, though. > > Yakov > Hugh