GENERAL SETTINGS
Vim internal use of encoding (this settings is must if you like to use utf-8 or you would like to convert encoding from one to another). I strongly recommend to set this setting in _vimrc file (Windows equivalent of Linux .vimrc file). You can open your _vimrc file with command: :e $MYVIMRC
:set encoding=utf-8
Bellow is actual setting that will convert to utf-8 when you execute :w (saving file). You can also set this in _vimrc file.
:set fileencoding=utf-8
There is also smart to set encodings (notice "s" at the end of command).
Bellow settings tries to recognize the encoding of existing file when file is opened. I also suggest to save this setting in _vimrc file.
:set fileencodings=ucs-bom,utf8,latin1
SAMPLE HOW TO CONVERT FILE ENCODING FROM ONE ENCODING TO ANOTHER
Now lets say you have a file in some other encoding like cp1250 (latin2) and you would like to convert encoding to utf-8.
Set internal Vim encoding to utf-8. A must have setting if multiple code pages are used and converting between them.
:set encoding=utf-8
Open file and let Vim know what is your current encoding file is saved in (e.g. cp1250 for Eastern Europe encodings = latin2)
:e ++enc=cp1250 YourFile.txt
or if file already opened: :e! ++enc=cp1250
Set target file encoding to utf-8:
:set fileencoding=utf-8
Now do actual save (conversion happens now):
:w
set encoding
) ?