Sunday, October 3, 2010

Re: How to set utf-8 locally (for a buffer) on loading the file

On Mon, Oct 4, 2010 at 5:08 AM, esquifit <esquifit@googlemail.com> wrote:
> I tried 'fileencoding', which didn't work. From the documentation I
> kind of understand that 'fileencoding' only affects user input after
> the variable was set, which in my case is useless. I don't care user

Hi, have you tried using fileencodings, instead of just fileencoding?

I set this from my _vimrc:
" set encoding as a variant of Unicode, as a superset of everything:
set encoding=utf-8
" list fileencodings as a list of encodings I am likely to use:
set fileencodings=ucs-bom,utf-8,cp949,cp1361

I don't have fileencoding (without the s) set to anything, but I'll be
looking into it.

I think something like the following should work for you:
set encoding=utf-8
set fileencodings=utf-8,latin1

Cheers,
Kyungjoon Lee

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment