Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
On 8/12/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: [...] > But gvim doesn't support an encoding named 'gbk'. If the system > encoding is 'gbk', the menu and toolbar get malformed. What do you mean by "system encoding"? How does Vim see this? I meant the $LANG variable. GBK is right an alias of cp936, so it is proper to add this alias entry into mbyte.c. But the situation with GB18030 was much more complicated and the current version of gvim is not able to handle it correctly. About GB18030 there is another long and not-so-funny but ridiculous story. If you like, I can tell you the detailed GOSSIP later... Because over 99% part of GB18030 and GBK is the same, and the remaining part is too difficult to handle, I want to set GB18030 as another alias of cp936. Do you think it is OK? [...] You may have uncovered a bug that went unnoticed so far. Please try to discover what causes this problem. I can't guess why the last character is messed up, looks strange. In fact this bug was noticed years before. But most of the Chinese people decided to tolerate this situation. Anyway, I'm going to work on~ [...] Regards, Edward L. Fox
Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
On 8/12/06, mwoehlke <[EMAIL PROTECTED]> wrote: Bram Moolenaar wrote: > hundred-and-one symptoms of being an internet addict: > 256. You are able to write down over 250 symptoms of being an internet > addict, even though they only asked for 101. So where is the complete list? ;-) I believe the list can't be complete because people invent new ways of internet addiction every day. 258. You are subscribed to mailing list for every piece of software you use. 259. You collect hilarious signatures from all 250 mailing lists you are subscribed to. Yakov
Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
Bram Moolenaar wrote: hundred-and-one symptoms of being an internet addict: 256. You are able to write down over 250 symptoms of being an internet addict, even though they only asked for 101. So where is the complete list? ;-) FIXME and XXX are two common keywords used to mark broken or incomplete code not only since XXX as a sex reference would grab everbodys attention but simply due to the fact that Vim would highlight these words. -- Hendrik Scholz ...and those of us that use KATE (I use VIM for one-off edits, and when I'm not working on my local box) simply edit alerts.xml :-) -- Matthew "We're all mad here. I'm mad. You're mad... You must be, or you wouldn't have come here." -- The Cheshire Cat
RE: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
> Bram, you have an overflow in your signature :) > > -- > > hundred-and-one symptoms of being an internet addict: > > 102. When filling out your driver's license application, you give > > your IP address. hundred-and-one symptoms of being an internet addict: 256. You are able to write down over 250 symptoms of being an internet addict, even though they only asked for 101. -- FIXME and XXX are two common keywords used to mark broken or incomplete code not only since XXX as a sex reference would grab everbodys attention but simply due to the fact that Vim would highlight these words. -- Hendrik Scholz /// 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///
RE: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
Bram, you have an overflow in your signature :) Max > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 10, 2006 1:44 PM > Subject: Re: Patch (Unofficial): Malformed characters in menu and toolbar > when using zh_CN.GBK encoding under Linux > > > > -- > hundred-and-one symptoms of being an internet addict: > 102. When filling out your driver's license application, you give > your IP address. > >
Re: Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
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.0 +0800 > --- ../vim7.my/runtime/menu.vim2006-08-09 16:21:03.0 +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///
Patch (Unofficial): Malformed characters in menu and toolbar when using zh_CN.GBK encoding under Linux
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.0 +0800 --- ../vim7.my/runtime/menu.vim2006-08-09 16:21:03.0 +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 :