I have an Autohotkey script to write Esperanto characters. It has the form

AppsKey & G::
    if GetKeyState("Shift", "P")
        send Ĝ

    send ĝ

Notepad has no problem with opening it in a way that shows both Ĝ and ĝ. On the other hand Vim can't display them.

After reading https://stackoverflow.com/questions/5166652/how-to-view-utf-8-characters-in-vim-or-gvim I added to my _vimrc:

set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
set guifont=Monaco:h11
set guifontwide=NSimsun:h12

Vim still doesn't display the character correctly. What do I have to do to get Vim to open the file properly?

  • 2
    Monaco is a OSX font − are you sure it's installed on your Windows machine? If I use set guifont=Consolas it seems to work (but the default font Gvim chooses doesn't!) Also, what exactly do you see? A question mark? Or a black block? Or something else? Mar 30 '16 at 17:07
  • 1
    @Carpetsmoker: Thank you, changing the font to Consolas fixed my issue.
    – Christian
    Mar 30 '16 at 17:10
  • 1
    @Carpetsmoker, why not move that comment into an answer? ;) Apr 30 '16 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.