On 07/01/09 23:59, Yegor Derevenets wrote:
> Hello.
>
> I'm trying to make vim show cyrillic text correctly on console.
>
> Here is what I have now (gvim displays the text correctly):
> http://www.vsi.ru/~yegor/tmp/vim-alphabet.png
>
> I'm running Vi IMproved 7.2 (2008 Aug 9, compiled Aug 9 2008
> 18:40:30) under Windows 2003 Server. The same problem occurs under
> Windows XP. termencoding=cp866 (default, and matches to what says
> 'mode' command).
>
> I'm pretty sure, that 7.0 managed to show cyrillic under Windows 2000,
> but it doesn't under Windows 2003.
>
> Any ideas?
Your screenshot seems to indicate that your Vim (both Console and GUI)
is configured correctly; however, unlike gvim, Console Vim has no
mastery over its font. If you're using Console Vim to edit Russian in a
terminal which cannot display the full Russian variant of the Cyrillic
alphabet, you'll perhaps be able to enter the right codes into the file
but they won't be displayed correctly.
In the System menu for the Dos Box containing Console Vim, find the
setting for the font, and try the available fonts one after another
while still displaying that alphabet page. Maybe one (or more) of them
will display correctly.
Notes:
1. The default 'termencoding' is usually the empty string; if your vimrc
changes 'encoding' it should first save the old value, as shown below;
2. In 'fileencodings', 8-bit encodings cannot give a "fail" signal so
anything after the first 8-bit encoding is ignored. (With the setting
shown on your screenshot, any already existing file which is not in
Unicode will be detected as cp1251 unless you override the detection by
means of a ++enc argument when opening the file.)
if has('multi_byte')
if &enc !~? '^u'
if &tenc != ''
let &tenc = &enc
endif
set enc=utf-8
endif
set fencs=ucs-bom,utf-8,cp1251
else
echomsg "Multi-byte not available - bypassing 'encoding' setup"
endif
See http://vim.wikia.com/wiki/Working_with_Unicode for details.
On this Linux system, Console Vim displays Russian perfectly (I proved
it by typing a little kindergarten song which I then yanked to the
clipboard, and pasted below) but it's easier since my system locale
($LANG) is en_US.UTF-8.
Цеплёнок пареный, цеплёнок жареный,
Пошёл по Невскему гулять;
Его поймали, арестовали,
Велели паспорт показать.
— Я не советский, я не кадетский,
Я просто волный гражданин:
Цеплята, уточки, одну минуточку,
Цеплята тоже хотят жить.
Best regards,
Tony.
--
default, n.:
[Possibly from Black English "De fault wid dis system is you,
mon."] The vain attempt to avoid errors by inactivity. "Nothing will
come of nothing: speak again." -- King Lear.
-- Stan Kelly-Bootle, "The Devil's DP Dictionary"
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---