Boyko Bantchev wrote:
Hello all,

In Vim 7.0, I seem to be running into a problem when
using cyrillic -- the cp1251 encoding, to be precise.
I notice two things not properly working for me (note that
none of them was a problem in the previous versions of Vim):

1) The ~ (tilde) command for switching the case of a
  character does not work on cyrillic.
2) Word boundaries (such as in the w, b, e commands)
  are unnatural for cyrillic.  I guess I have to do
      :set iskeyword=@,48-57,_,192-255
  somewhere, but I am not sure where exactly, or under
  what conditions.

Could someone help with these, please.  Thank you.

Cheers,
  Boyko



What I am proposing below is not a proper cure but (if it works) a workaround: Try to set 'encoding' (how gvim internally represents the data) to UTF-8. Then the local value of 'fileencoding' (how this particular file's data is represented on disk) can be set to cp1251:

---- somewhere in vimrc. Don't change 'encoding' before it.
   if &termencoding == ""
      let &termencoding = &encoding
   endif
   set encoding=utf-8
---- the following, also in vimrc, is optional
   setglobal bomb
---- to edit a ifle in cp1251
   :e ++enc=cp1251 filename.ext
---- or else, if most of your files are in cp1251: add to the bottom of your vimrc:
   set fileencodings=ucs-bom,utf-8,cp1251
   setglobal fileencoding=cp1251
---- in the latter case, to edit in (say) latin1
   :e ++enc=latin1 filename


see
   http://vim.sourceforge.net/scripts/script.php?script_id=789
   http://vim.sourceforge.net/tips/tip.php?tip_id=246
   :help 'encoding'
   :help 'termencoding'
   :help 'fileencoding'
   :help 'fileencodings'
   :help 'bomb'
   :help ++opt
   etc.


Best regards,
Tony.

Reply via email to