Edward L. Fox wrote: > Patch Unofficial > Problem: Menu and toolbar: Doesn't display properly when using > zh_CN.GBK encoding under Linux. > Solution: Use gb2312 to generate the menu and toolbar to get proper > display, then use cp936 instead of GBK which is a correct alias under > Linux. > Files: runtime/menu.vim > > *** runtime/menu.vim 2006-04-18 06:06:31.000000000 +0800 > --- ../vim7.my/runtime/menu.vim 2006-08-09 16:21:03.000000000 +0800 > *************** > *** 48,53 **** > --- 48,56 ---- > " same menu file for them. > let s:lang = substitute(s:lang, 'iso_8859-15\=$', "latin1", "") > menutrans clear > + if s:lang == "zh_cn.gbk" || s:lang == "zh_cn.gb18030" > + set enc=gb2312 > + endif > exe "runtime! lang/menu_" . s:lang . ".vim" > > if !exists("did_menu_trans") > *************** > *** 1094,1097 **** > --- 1097,1104 ---- > let &cpo = s:cpo_save > unlet s:cpo_save > > + if s:lang == "zh_cn.gbk" || s:lang == "zh_cn.gb18030" > + set enc=cp936 > + endif > + > " vim: set sw=2 :
The menu.vim file should never change 'encoding'. It should load menus that are appropriate for the current 'encoding' and language. If the intention is to have the default for 'encoding' use something specific in $LANG then this must be done in enc_locale() in src/mbyte.c -- hundred-and-one symptoms of being an internet addict: 102. When filling out your driver's license application, you give your IP address. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///