I use vim
and gVim
on Windows, and vim
in a virtual Linux box for programming. Often I need to change gettext
catalog fi
The only way I have been able to consistently change file-encoding to UTF-8 on windows is by using notepad++ or powershell (see below). Regardless of the VIM version changing the file encoding from within VIM is gives inconsistent results at best.
Once the file has UTF-8 encoding set outside of vim there are no further issues. File encoding set through vim on linux or mac are respected by windows.
In this thread of powershell command is suggested to change the encoding. That is the fastest way I know of to set a project to UTF-8 on windowws and work without further hassle.
In your examples above, not that there is a difference between :set encoding=utf-8
(which is temporary and only in your display) and set fileencoding=utf-8
which will change the file on save.
After reading the question How to view UTF-8 Characters in VIM or Gvim, I tried several guifont
-settings (:set guifont?
yielded nothing), and indeed some of them feature typographical quotes.
The following guifont
settings worked for me on my Windows 8.1 system:
For guifontwide
I found
to work for chinese characters.