> Another question to wizards)
>
> I run gvim on Windows 7 Professional x86 so my default encoding is set to
> native cp1251. To avoid problems when opening files with Unicode encoding
> ('fileencoding') I want to change 'encoding' value to utf-8. But when I do
> so some standard messages in command line translated to Russian before are
> corrupted. And look like this:
>
> href=http://dl.dropbox.com/u/14502217/messages_corrupted.png
>
> Is there any way to somehow "reencode" them or to turn off such translated
> elements at all?
>
Where do you set your encoding? It should be pretty much the first
thing in your .vimrc. The only thing it comes after for me, is "set
nocompatible" and "let &termencoding = &encoding".
If I understand correctly, when you change your encoding all the
buffers, mappings, menus, and internal variables do not change their
binary-encoded value; only their meaning changes. So, you need to set
your encoding before doing anything else which might set these values.
I.e., set it at the very beginning of your .vimrc.
By the way, if you haven't figured it out already, it is probably a
good idea to include cp1251 in your 'fileencodings' option, before any
other 8-bit encoding, so that Vim correctly loads files in this
encoding as well.
See the :help obviously, but also this for some reference:
http://vim.wikia.com/wiki/Working_with_Unicode
That's how I got started with my encoding setup.
--
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