Wednesday, January 14, 2009

How to make GVIM/VIM show unicode string?

Add the following setting in vimrc:

"""""""""""""""""""""""""""""""""""""""""""""""""
if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8 bomb
set fileencodings=ucs-bom,utf-8,latin1
endif
"""""""""""""""""""""""""""""""""""""""""""""""""

Then it can display multi_byte string properly.

No comments: