Convert multiple files from latin1 to utf8 with vim

(Last Updated On: 11 December, 2017)

If you have several files that need to be converted to utf8, you can do it with vim.

First start vim with:

Which will find all .htm and .html files from the current directory.

Then in vim, use : to go into command mode.

Run these two commands:
:set nomore
:bufdo set fileencoding=utf8 | w


Leave a Reply

Your email address will not be published. Required fields are marked *