La Vita è Bella
Tuesday, January 25, 2005
Resolved encoding problem in Vim
I've resolved the annoying encoding problem in vim today, and my Vim can handle UTF-8 encoded Chinese files correctly now
Just insert the following script into the vimrc file:
set fencs=gb18030,utf-8
In which "fencs" stands for "fileencodings".
The first one (gb18030) will be used for new files. While opening a file, vim will try to convert it use the first one, and the second one if failed, and third...
And I can convert a file between GB18030 and UTF-8 easily with vim now. Just open it, and then set fenc to the desired encoding, then write it, that's all
Vim is pretty good
tags: i18n, chinese, vim, utf8
00:19:00 by fishy - i18n.zh - Permanent Link
Revision: 1.0/1.0, last modified on 2005-01-25 @ 15:19.
Karma: 10 (55.32% out of 94 were positive) [+/-]
You can subscribe to RSS 2.0 feed for comments and trackbacks
Trackbacks:There are currently no trackbacks for this item.Use this TrackBack url to ping this item (right-click, copy link target). If your blog does not support Trackbacks you can manually add your trackback by using this form.
No comments yet




