Mojca Miklavec wrote:
Hello,

I translated the menus for gvim and wanted to use them under windows,
but the non-latin characters simply don't show in the menu (other
characters are shown instead: squares š and ž and some other character
for č).

All other programs under Windows work fine, the encoding should also
be OK (If I rename the Russian file to menu_sl_si.utf-8.vim, I only
get question marks in menu, but I saw other cyrillic programs running
on the same computer without any problems as well).

I suspect that Vim might be asking Windows for Western European font
for the menu. I'm not sure about it, but in any case it's a bit weird.

Is there any remedy for it?

Any hints would be appreciated,
   Mojca Miklavec



You must make sure that you have:
- an 'encoding' which includes the non-Latin characters you want to use
- (in console Vim) a terminal code page which includes them
- (in gvim) a 'guifont' which has the glyphs for them.

Check 'encoding' and 'guifont' by means of

   :verbose set encoding? guifont?

"Renaming" the file to menu_sl_si.utf-8.vim (as with "rename" or "copy" in a Dos shell, "mv" or "cp" in a Unix shell) probably won't be OK because Vim will interpret the file data differently. You need to:

1. make sure that 'encoding' is set to utf-8. If it isn't, fist set 'termencoding' to the old value of 'encoding' (as it is immediately after loading, before any script or command-line ex-command changes it) then set 'encoding' to utf-8. You can do this in a script (e.g. in your vimrc) by means of

   if &termencoding == ""
      let &termencoding = &encoding
   endif
   set encoding=utf-8

2. edit the file (under its "old" name) and check that it is displayed correctly. You may need to use ++enc= in the :edit command to specify the current 'fileencoding' for the file. 3. check that there is a line "scriptencoding utf-8" near the top of the file, before the first non-Latin character 4. save the file with ":saveas ++enc=utf-8 ~/.vim/lang/menu_sl_si.utf-8.vim" (on Unix) or ":saveas ++enc=utf-8 ~/vimfiles/lang/menu_sl_si.utf-8.vim" (on Windows) (without hte quotes in either case).

See
   http://vim.sourceforge.net/tips/tip.php?tip_id=246
   :help ++opt
   :help :scriptencoding


Best regards,
Tony.

Reply via email to