On 28/09/09 22:06, Maxim Kim wrote:
>
> Hi,
>
> Can you tell me how can I setup my vim to handle russian (utf-8) text
> in win console?
> Simple russian phrase
>
> Привет, меня зовут Максим.
>
> is unreadable. Though I can copy and it paste here.
>
> My settings are:
> :set enc? tenc?
> encoding=utf-8
> termencoding=cp866
>
> I thought it might be font issue, but with<C-Z> I can paste the same
> text into shell and it looks good.
> So this is not font issue.
>
> Thanks,
> Maxim.
I'm not sure.
- IIUC, typing
echo Здравствуйте мир!
at the cmd.exe prompt works OK (echoes the correct Russian greeting in
reply) and the result can be pasted (but not into Vim)?
- Does it make a difference if you leave 'termencoding' empty?
- Are you sure your console uses cp866? The email I'm replying to was in
koi8-r.
Until (or unless) this issue is resolved, you ought to be able to use
gvim (with the same settings), where anything can be stored in memory
(as a UTF-8 bytestring) and displayed in the GUI in some well-chosen
font. (I recommend _not_ to use Lucida_Console because its Cyrillic bold
glyphs are a tiny wee bit wider than its unbold glyphs -- or used to be
when I was on XP; Courier_New should be OK even if less "pretty".) A
well-chosen 'fileencodings' setting and/or use of the ++enc modifier
(see ":help ++opt") in commands such as :e <filename>, :new <filename>,
:tabedit <filename>, etc. should let you edit files in any Cyrillic
encoding such as koi8-r, koi8-u, ISO-8859-5, Windows-1251 or cp866 -- as
well, of course, as in Unicode encodings such as UTF-8. (It might not be
possible to get _automatic_ recognition of all Cyrillic encodings but
you can always _tell_ gvim which 'fileencoding' to use, e.g. by means of
:e ++enc=cp866 russtext.txt
)
Best regards,
Tony.
--
A new dramatist of the absurd
Has a voice that will shortly be heard.
I learn from my spies
He's about to devise
An unprintable three-letter word.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---