HOME BLOG

How to fix issue of “’” showing on page instead of “ ‘ ” in gVim in Windows

Posted on: September 26th, 2020 by Olu No Comments

Hi folks,

Recently I experienced an issue where when I opened a file using my favourite editor gVim in Windows and found to my utter bewilderment that the “’” character was showing instead of “ ‘ ”. I’ll quickly talk about how to fix such problem.

First, what’s the cause? The cause is that the editor isn’t using UTF-8 encoding. It might be using ISO-8859-1/Windows-1252. So, to fix it, update gVim to use UTF-8. Here’s how to do that.

Open your _vimrc file and add the following lines

 

set encoding=utf-8
set fileencoding=utf-8

Save and close the file. That’s it. Your apostrophe characters should now display correctly. Happy editing.

Sources:

“’” showing on page instead of “ ‘ ”. stackoverflow. https://stackoverflow.com/questions/2477452/%C3%A2%E2%82%AC-showing-on-page-instead-of

Set encoding and fileencoding to utf-8 in Vim. stackoverflow. https://stackoverflow.com/questions/16507777/set-encoding-and-fileencoding-to-utf-8-in-vim

Leave a Reply