On 29/09/09 08:11, Maxim Kim wrote:
>
>
>
>
> On 29 сен, 09:36, Tony Mechelynck<[email protected]>
> wrote:
>> On 29/09/09 06:37, Maxim Kim wrote:
>> [...]
>>
>> IIUC, the Vim default for 'termencoding' is the empty string. Maybe that
>> option is set elsewhere, maybe in the UTF-8-setting script that I
>> published at vim-online, or maybe in some other script. What does
>> Console Vim answer to
>>
>>          :verbose set enc? tenc?
>>
>> immediately after startup (the way you normally start it, with vimrc and
>> all)?
> encoding=utf-8
>      Last set from ~\_vimrc
> termencoding=cp866
>>
>> To know what console encoding yout WinXP uses, start Vim as
>>
>>          vim -N -u NONE
>>
>> (which loads neither your vimrc nor any global plugins), then, after
>> startup, ask
>>
>>          :set enc?
>>
>> That should show you the "default encoding" used by the underlying terminal.
> cp1251
>
> PS
> This is quite strange. If I (using my _vimrc with set enc=utf-8)
>      1. Change font to Lucida Console.
>      2. Write some text -- everything is ok. I can see correct russian
> text.
>      3. Change font to standard bitmap font -- everything is ok. I can
> see
>      previously entered russian text.
>      4. Write the same text -- previously entered text is ok, current
> is crap
>      with a lot of triangles.
>      5. Change font to Lucida Console -- text from 2. is ok, text from
> 4. is
>      still crap but with questions and incorrect letters.
>      6. Press<C-L>  and all the entered text (2, 4) is correct.

Oho! Sounds like a missing screen redraw somewhere. You aren't using 
'lazyredraw' by any chance? Also, what Vim version and patchlevel are 
you using? (as shown on the second non-blank line of the ":intro" 
screen, or as the first two lines -- starting "VIM - Vi Improved" and 
"Included patches" respectively -- in the output of ":version")

Or rather -- Vim is probably not aware that the font has been changed 
(see bottom paragraph before my sig below) so it doesn't redraw anything.

What happens if you hit Ctrl-L (in Normal mode) between steps 4 and 5? 
My guess would be that the text from step 2 turns to crap, which might 
indicate that your bitmapped font has wrong glyphs for your current 
terminal encoding. I expect that the Russian would reappear after step 
6, even where it had changed to crap at step 4½.

>
> So the only option I can see for now is using Lucida Console.

Is that so bad? (in Console Vim, not gvim)


The font in Console Vim is in any case a function of the terminal -- Vim 
has no action on it: it can neither determine what is in use nor change 
it -- unless maybe by running the appropriate OS-dependent commands as 
external programs, for instance via system()


Best regards,
Tony.
-- 
Albert Einstein, when asked to describe radio, replied: "You see, wire
telegraph is a kind of a very, very long cat.  You pull his tail in New
York and his head is meowing in Los Angeles.  Do you understand this?
And radio operates exactly the same way: you send signals here, they
receive them there.  The only difference is that there is no cat."

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to