vim doesn't display cp1252 characters

801 views Asked by At

I'm running gvim, under Windows. I pasted some text from a web page but vim does not display the hyphen and smart quotes.

When I check the encoding that vim is using (:set enc) vim reports that it is using cp1252.

When I check the hex value of the codes under the cursor (ga) vim reports the correct cp1252 code values (0x96, 0x93, and 0x94).

And yet it does display the smart single quotes (0x91 and 0x92)

Can anyone explain what is happening?

Thanks, Steve

1

There are 1 answers

0
Armali On

The "DejaVu_Sans_Mono" and "Lucinda_Console" fonts both displayed the characters with codes between 0xA0 and 0x9F correctly. There are probably others that do so as well. I'm using gvim, so I selected them from the menubar (Edit/Select Font). Subsequently I added the line "set guifont=DejaVu_Sans_Mono:h12" to my _vimrc file. The "h12" specifies font size. – justerman