Re: font and encoding issues

59 views
Skip to first unread message

Tony Mechelynck

unread,
Nov 16, 2012, 5:50:42 AM11/16/12
to vim...@googlegroups.com, yahalom
On 16/11/12 10:17, yahalom wrote:
> For some reason I have issues with seeing Hebrew by default with vim on my new window 7 computer. all other application works fine with Hebrew.
> I installed vim73_46.
> I tried to see what causes the issue comparing the new computer with the old one (where all works fine) and found that there are 2 differences:
> 1. the default encoding on the old is cp1255 and on the new is latin1.
> 2. the font on both is Fixedsys but on the old when I go to choose font the Fixedsys has a 'Hebrew' in the script selection and on my new machine it is 'western'.
>
> how can I make the fixedsys support hebrew or be hebrew in the script selection?
> I installed on the windows font 'Fixedsys excelsior' but vim does not show it in the font selection. why?
> why is the encoding difference ?(vimrc is the same)
>
> thanks
>

The encoding difference means there is a difference in your system
locale: on Windows it's in your "Country Preferences" (or something that
sounds more or less like that).

You can set the 'encoding' in your vimrc (preferably near the top of the
file), I recommend UTF-8 which allows Vim to represent any possible
'fileencoding' in memory: the conversion is trivial (and any Vim
compiled with +multi_byte can do it) for us-ascii, latin1, utf-8 (duh!)
and any endianness of ucs-2, utf-16 and utf-32; for other charsets you
need both a Vim version compiled with +iconv (on Windows, usually
+iconv/dyn) and the "iconv" library (on Windows, iconv.dll or
libiconv.dll) in some directory where Vim can find it. It is not
distributed with Vim.

You can set the font using the 'guifont' option. Vim can use only
monotype fonts (fonts defined as having characters all of a single
width). In my experience, the Courier_New font (which is maybe not very
pretty, though IMHO prettier than Fixedsys) has a pretty good covering
of encodings. When my "preferred" font hasn't got glyphs for the
characters I want to see, that's the one I fall back onto.

For details, see:
http://vim.wikia.com/wiki/Working_with_Unicode
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI


Best regards,
Tony.
--
ARTHUR: Charge!
[They all charge with swords drawn towards the RABBIT. A tremendous
twenty
second fight with Peckinpahish shots and borrowing heavily also on the
Kung Fu and karate-type films ensues, in which some four KNIGHTS are
comprehensively killed.]
ARTHUR: Run away! Run away!
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

yahalom

unread,
Nov 16, 2012, 10:12:04 AM11/16/12
to vim...@googlegroups.com, yahalom

Changing the "system locale" indeed solved all the problem including making the fixedsys work nicely with Hebrew.
Thanks for the quick response and for reminding me to double check the setting as I thought that this setting were already done.

Reply all
Reply to author
Forward
0 new messages