Yongwei Wu wrote: > > > On 2/27/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > If I understand it correctly is GB18030 a multi-byte character set that > > > > is mostly the same as cp936, but adds a number of 4-byte characters. > > > > Vim does not support those 4-byte characters, thus setting 'encoding' to > > > > gb18030 won't work. > > > > > > > > But conversion between gb18030 and utf-8 should work, thus when > > > > 'encoding' is utf-8 it should be possible to use gb18030 in > > > > 'fileencodings' and 'fileencoding'. Perhaps you can check if that > > > > works. > > > > > > No, with Patch 58 Vim regards gb18030 as an alias for cp936, and > > > gb18030 does not work at all: this is the major problem. > > > > Please be specific: What do you mean with "does not work at all"? > > As I said, Vim regards gb18030 as cp936 after Patch 58. I.e., "e > ++enc=gb18030" is equivalent to "e ++enc=cp936" now. One cannot > correctly open in Vim a file encoded in GB18030, and the 4-byte > encoded characters will not be correct.
Since Vim does not support gb18030 for 'encoding', and using "gbk" or "cp936" will not support the 4-byte characters either, the only way would be to set 'encoding' to "utf-8". The current solution to set 'encoding' to "cp936" works only for most characters, not all. It would be possible to make a special case for GB18030 in set_init_1(). This would set 'encoding' to "utf-8" and 'termencoding' to "GB18030". Perhaps you can try these settings and check if everything works: translated menus, input methods, using Vim in a terminal (if a GB18030 terminal exists), etc. -- hundred-and-one symptoms of being an internet addict: 213. Your kids start referring to you as "that guy in front of the monitor." /// 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 ///
