Set encoding in autocmd `VimLeavePre` for `.viminfo`.
endif
" ----------
+if has("iconv")
+function! SetViminfoEncoding()
+ " Set universal encoding for .viminfo
+ if &encoding != 'utf-8'
+ set encoding=utf-8
+ endif
+endfunction
+autocmd VimLeavePre * call SetViminfoEncoding()
+endif
+
" This has to go to the very end of ~/.vimrc to allow reading the .vimrc
set secure " safer working with script files in the current directory