Ben, thanks, that worked out beautifully. Specifically:

1. Setting the language to C works as expected (i.e. English language
in all menus and proper display of unicode symbols in the text), not
setting the language (which results in selection of default system
locale, which is CP1251) results in a mojibake (there are no UTF-8
files for the Russian locale installed, so language can't be set to
ru_RU.UTF-8).

2. Setting encoding to utf-8 before listchars works as expected,
otherwise throws an error about non-ASCII symbols. Who knew?

Thanks again, I learned a lot playing with sequence of commands.

Cheers, Alexei

2012/2/15 Ben Fritz <fritzophre...@gmail.com>:
>
>
> On Feb 14, 1:02 pm, Алексей Данченков <adanchen...@gmail.com> wrote:
>> Hi, everybody!
>>
>> I need to use the UTF-8 encoding in gvim on Windows (even if just for
>> non-printable symbols for invisibles). However, the menu locale stays
>> in system's default CP1251 (for Russian).
>>
>> Here is the excerpt from my gvimrc:
>>
>>   language C
>>   set guifont=Courier_New:h12:cANSI
>>   set langmenu=C
>>   set helplang=en
>>   set encoding=utf-8
>>   set termencoding=utf-8
>>   set fileencoding=utf-8
>>   set fileencodings=utf-8,koi8-r,cp1251,default,latin1
>>
>> Still, I have mojibake in the top menu (a CP1251-menu displayed in
>> US-ASCII locale). Is there a setting I forgot to use?
>>
>
> Does it work if you set all your encoding options first (before
> anything else in your .vimrc other than perhaps a set nocompatible)?
> Vim stores everything internally in the encoding specified by
> 'encoding', and doesn't translate anything it already has when the
> encoding changes, so if the menus are already set up when you set you
> encoding they'll be wrong.
>
> You mention setting encoding in your gvimrc. Maybe try it in
> your .vimrc? You can surround it with a has('gui_running') check if
> you only want it when using gvim.
>
> --
> 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

-- 
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

Reply via email to