Created
April 13, 2011 11:06
-
-
Save cpylua/917364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" If TOhtml is unavailable or the wrong version, at least handle some | |
" canonical encoding names in Vim. | |
elseif nenc =~ 'iso[-_]8859-1' | |
return 'latin1' | |
elseif nenc =~ 'iso[-_]8859-2' | |
return 'latin2' | |
elseif necn ==? 'gb2312' " necn should be nenc | |
return 'cp936' " GB2312 imprecisely means CP936 in HTML | |
elseif nenc =~ '\(cp\|win\(dows\)\?\)-125\d' | |
return 'cp125'.nenc[strlen(nenc)-1] | |
elseif nenc == 'utf8' | |
return 'utf-8' | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment