:dig, how display 'ŷ','€' correctly? gvim(vista)

13 views
Skip to first unread message

William Fugy

unread,
Jul 4, 2010, 6:05:48 AM7/4/10
to vim...@googlegroups.com
Hi list,

In my gVim(Vista), could display ē, ë, ÿ correctly, couldn't display
ŷ, €. However, it's all OK in Notepad/WinWord.

Does anyone know how could i show it well?

--------------------
i checked the digraph list ':dig', the corresponding positions of ŷ/€
show a white box( evening color scheme).


Best Regards,
-William

Tony Mechelynck

unread,
Jul 4, 2010, 7:37:14 AM7/4/10
to vim...@googlegroups.com, William Fugy

These symbols (as well as French Œ œ) are not present in the Latin1
charset. So:

1. Make sure your Vim is set up to use Unicode, see
http://vim.wikia.com/Working_with_Unicode — and note that 'encoding'
should only be changed at startup, before file data has been loaded in
Vim memory and before defining any options, mappings, etc. with
character values above 0x7F; otherwise the data already in memory may
get corrupt.

2. Then you can enter these characters in Insert mode with one of the
following methods:

- directly, if your keyboard driver allows it:

AltGr+e (usually) gives €
dead-circumflex (if your national keyboard has one) then y gives ŷ

- digraphs (see :help digraph.txt)

Ctrl-K then = then e gives €
Ctrl-K then y then > gives ŷ

- Unicode codepoint (see :help i_CTRL-V_digit)

Ctrl+V u 20ac (no spaces) gives €
Ctrl+V u 0177 (no spaces) gives ŷ

Of course, in order to save them to disk you will need a file with an
appropriate 'fileencoding': UTF-8 is OK, ISO-8859-15 may or may not be
OK (I haven't tested), Latin1 is not OK.


Best regards,
Tony.
--
A chubby man with a white beard and a red suit will approach you soon.
Avoid him. He's a Commie.

Tony Mechelynck

unread,
Jul 4, 2010, 7:43:01 AM7/4/10
to vim...@googlegroups.com, William Fugy
On 04/07/10 13:37, Tony Mechelynck wrote:
> On 04/07/10 12:05, William Fugy wrote:
>> Hi list,
>>
>> In my gVim(Vista), could display ē, ë, ÿ correctly, couldn't display
>> ŷ, €. However, it's all OK in Notepad/WinWord.
>>
>> Does anyone know how could i show it well?
>>
>> --------------------
>> i checked the digraph list ':dig', the corresponding positions of ŷ/€
>> show a white box( evening color scheme).
>>
>>
>> Best Regards,
>> -William
>>
>
> These symbols (as well as French Œ œ) are not present in the Latin1
> charset. So:
>
> 1. Make sure your Vim is set up to use Unicode, see
> http://vim.wikia.com/Working_with_Unicode — and note that 'encoding'
> should only be changed at startup, before file data has been loaded in
> Vim memory and before defining any options, mappings, etc. with
> character values above 0x7F; otherwise the data already in memory may
> get corrupt.

I forgot:
1bis: Make sure you have a font with the necessary glyphs. For gvim, see
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI . For Console Vim,
it's a terminal-configuration problem, not a Vim problem.

>
> 2. Then you can enter these characters in Insert mode with one of the
> following methods:
>
> - directly, if your keyboard driver allows it:
>
> AltGr+e (usually) gives €
> dead-circumflex (if your national keyboard has one) then y gives ŷ
>
> - digraphs (see :help digraph.txt)
>
> Ctrl-K then = then e gives €
> Ctrl-K then y then > gives ŷ
>
> - Unicode codepoint (see :help i_CTRL-V_digit)
>
> Ctrl+V u 20ac (no spaces) gives €
> Ctrl+V u 0177 (no spaces) gives ŷ
>
> Of course, in order to save them to disk you will need a file with an
> appropriate 'fileencoding': UTF-8 is OK, ISO-8859-15 may or may not be
> OK (I haven't tested), Latin1 is not OK.
>
>
> Best regards,
> Tony.
--

Reclaimer, spare that tree!
Take not a single bit!
It used to point to me,
Now I'm protecting it.
It was the reader's CONS
That made it, paired by dot;
Now, GC, for the nonce,
Thou shalt reclaim it not.

William Fugy

unread,
Jul 4, 2010, 12:25:18 PM7/4/10
to Tony Mechelynck, vim...@googlegroups.com
Sure, i confirm my gVim works in Unicode and i could input ŷ, €, ē, ë,
ÿ...freely and correctly. Unfortunately, some of them, including ŷ, €,
couldn't show well on gVim screen, as well as the result of ex-command
':dig'. Certainly, all the characters inputted in my gVim displayed
correctly by Notepad/Winword.

i have done a test. In my ~/.vimrc, have only the following 4-lines
content. However, it show a white box too in the corresponding
positions of ŷ, €., and show a '?', instead of a white box, if remove
'colorscheme evening'

-------------~/.vimrc---------
set termencoding=utf-8
set encoding=utf-8
set fileencodings=utf-8
colorscheme evening

Is it related to my some default setting about regional and language
in Vista? it's shouldn't like this.


Best Regards,
-William

Tony Mechelynck

unread,
Jul 4, 2010, 1:40:56 PM7/4/10
to William Fugy, vim...@googlegroups.com
On 04/07/10 18:25, William Fugy wrote:
> Sure, i confirm my gVim works in Unicode and i could input ŷ, €, ē, ë,
> ÿ...freely and correctly. Unfortunately, some of them, including ŷ, €,
> couldn't show well on gVim screen, as well as the result of ex-command
> ':dig'. Certainly, all the characters inputted in my gVim displayed
> correctly by Notepad/Winword.
>
> i have done a test. In my ~/.vimrc, have only the following 4-lines
> content. However, it show a white box too in the corresponding
> positions of ŷ, €., and show a '?', instead of a white box, if remove
> 'colorscheme evening'
>
> -------------~/.vimrc---------
> set termencoding=utf-8
> set encoding=utf-8
> set fileencodings=utf-8
> colorscheme evening
>
> Is it related to my some default setting about regional and language
> in Vista? it's shouldn't like this.
>
>
> Best Regards,
> -William

1. Please bottom-post on this list.

2. See my other post about fonts: I suspect that your chosen 'guifont'
lacks the necessary glyphs. Try

:set guifont=*

then if there is an input box in the popup (or if you can replace the
displayed "example characters"), paste €ŷ there, or maybe append ŷ€ to
what is already there, and finally select one font name after another
until you find something suitable.


Best regards,
Tony.
--
Es brilig war. Die schlichte Toven
Wirrten und wimmelten in Waben;
Und aller-mümsige Burggoven
Dir mohmen Räth ausgraben.
-- Lewis Carrol, "Through the Looking Glass"

William Fugy

unread,
Jul 4, 2010, 8:21:28 PM7/4/10
to Tony Mechelynck, vim...@googlegroups.com

Yes, my default 'guifont' is 'fixedsys', it couldn't show well for ŷ€.
Display is OK after modifying 'fixedsys' to 'Courier_New'.
Thank you very muck.

However, i found it's slower than before while PageDown/PageUp.
Maybe, it's more better if either gVim or i could implement show ŷ€
with 'Courier New' and the others with 'fixedsys'. Of course, it's a
reverie unless change the 'fixedsys' font directly and make Windows
accept too.

Thanks again,
-William

William Fugy

unread,
Jul 5, 2010, 1:34:08 AM7/5/10
to Tony Mechelynck, vim...@googlegroups.com
On Mon, Jul 5, 2010 at 10:21 AM, William Fugy <viar...@gmail.com> wrote:
> On Mon, Jul 5, 2010 at 3:40 AM, Tony Mechelynck
> <antoine.m...@gmail.com> wrote:
>> On 04/07/10 18:25, William Fugy wrote:
>> 1. Please bottom-post on this list.
>>
>> 2. See my other post about fonts: I suspect that your chosen 'guifont' lacks
>> the necessary glyphs. Try
>>
>>        :set guifont=*
>>
>> then if there is an input box in the popup (or if you can replace the
>> displayed "example characters"), paste €ŷ there, or maybe append ŷ€ to what
>> is already there, and finally select one font name after another until you
>> find something suitable.
>>
>>
>> Best regards,
>> Tony.
>> --
>> Es brilig war.  Die schlichte Toven
>>        Wirrten und wimmelten in Waben;
>> Und aller-mümsige Burggoven
>>        Dir mohmen Räth ausgraben.
>>                -- Lewis Carrol, "Through the Looking Glass"
>>
>
> Yes, my default 'guifont' is 'fixedsys', it couldn't show well for ŷ€.
> Display is OK after modifying 'fixedsys' to 'Courier_New'.
> Thank you very muck.

Sorry, it's "Thank you very much."
-William

Tony Mechelynck

unread,
Jul 5, 2010, 11:00:15 AM7/5/10
to William Fugy, vim...@googlegroups.com
On 05/07/10 02:21, William Fugy wrote:
[...]

> Yes, my default 'guifont' is 'fixedsys', it couldn't show well for ŷ€.
> Display is OK after modifying 'fixedsys' to 'Courier_New'.
> Thank you very muck.
>
> However, i found it's slower than before while PageDown/PageUp.
> Maybe, it's more better if either gVim or i could implement show ŷ€
> with 'Courier New' and the others with 'fixedsys'. Of course, it's a
> reverie unless change the 'fixedsys' font directly and make Windows
> accept too.
>
> Thanks again,
> -William
>

No, the only gvim version which can borrow glyphs from other fonts when
there are missing ones in the current 'guifont' is GTK2, and it runs
only on X11 systems.

Fixedsys is notoriously lacking when it comes to multibyte encodings.
You could try some more fonts, that's all I can say. When I was on
Windows I used Lucida_Console except for Russian (because its bold
Cyrillic glyphs were one pixel wider than the rest) and CJK (because it
lacked Chinese glyphs); but I was more interested in the prettiness than
in the speed of the display.


Best regards,
Tony.
--
Hartley's First Law:
You can lead a horse to water, but if you can get him to float
on his back, you've got something.

Reply all
Reply to author
Forward
0 new messages