Karsten Hopp f2b8c1
To: vim-dev@vim.org
Karsten Hopp f2b8c1
Subject: patch 7.0.206
Karsten Hopp f2b8c1
Fcc: outbox
Karsten Hopp f2b8c1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f2b8c1
Mime-Version: 1.0
Karsten Hopp f2b8c1
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp f2b8c1
Content-Transfer-Encoding: 8bit
Karsten Hopp f2b8c1
------------
Karsten Hopp f2b8c1
Karsten Hopp f2b8c1
Patch 7.0.206 (after 7.0.058)
Karsten Hopp f2b8c1
Problem:    Some characters of the "gb18030" encoding are not handled
Karsten Hopp f2b8c1
	    properly.
Karsten Hopp f2b8c1
Solution:   Do not use "cp936" as an alias for "gb18030" encoding.  Instead
Karsten Hopp f2b8c1
	    initialize 'encoding' to "cp936".
Karsten Hopp f2b8c1
Files:	    src/mbyte.c, src/option.c
Karsten Hopp f2b8c1
Karsten Hopp f2b8c1
Karsten Hopp f2b8c1
*** ../vim-7.0.205/src/mbyte.c	Tue Dec  5 22:09:02 2006
Karsten Hopp f2b8c1
--- src/mbyte.c	Tue Feb 27 16:27:44 2007
Karsten Hopp f2b8c1
***************
Karsten Hopp f2b8c1
*** 364,370 ****
Karsten Hopp f2b8c1
      {"949",		IDX_CP949},
Karsten Hopp f2b8c1
      {"936",		IDX_CP936},
Karsten Hopp f2b8c1
      {"gbk",		IDX_CP936},
Karsten Hopp f2b8c1
-     {"gb18030",		IDX_CP936},	/* only 99% the same */
Karsten Hopp f2b8c1
      {"950",		IDX_CP950},
Karsten Hopp f2b8c1
      {"eucjp",		IDX_EUC_JP},
Karsten Hopp f2b8c1
      {"unix-jis",	IDX_EUC_JP},
Karsten Hopp f2b8c1
--- 364,369 ----
Karsten Hopp f2b8c1
*** ../vim-7.0.205/src/option.c	Tue Oct 17 18:36:03 2006
Karsten Hopp f2b8c1
--- src/option.c	Thu Mar  1 21:02:06 2007
Karsten Hopp f2b8c1
***************
Karsten Hopp f2b8c1
*** 3290,3295 ****
Karsten Hopp f2b8c1
--- 3290,3303 ----
Karsten Hopp f2b8c1
  	 * If not, go back to the default "latin1". */
Karsten Hopp f2b8c1
  	save_enc = p_enc;
Karsten Hopp f2b8c1
  	p_enc = p;
Karsten Hopp f2b8c1
+ 	if (STRCMP(p_enc, "gb18030") == 0)
Karsten Hopp f2b8c1
+ 	{
Karsten Hopp f2b8c1
+ 	    /* We don't support "gb18030", but "cp936" is a good substitute
Karsten Hopp f2b8c1
+ 	     * for practical purposes, thus use that.  It's not an alias to
Karsten Hopp f2b8c1
+ 	     * still support conversion between gb18030 and utf-8. */
Karsten Hopp f2b8c1
+ 	    p_enc = vim_strsave((char_u *)"cp936");
Karsten Hopp f2b8c1
+ 	    vim_free(p);
Karsten Hopp f2b8c1
+ 	}
Karsten Hopp f2b8c1
  	if (mb_init() == NULL)
Karsten Hopp f2b8c1
  	{
Karsten Hopp f2b8c1
  	    opt_idx = findoption((char_u *)"encoding");
Karsten Hopp f2b8c1
*** ../vim-7.0.205/src/version.c	Tue Feb 27 23:06:44 2007
Karsten Hopp f2b8c1
--- src/version.c	Fri Mar  2 19:58:04 2007
Karsten Hopp f2b8c1
***************
Karsten Hopp f2b8c1
*** 668,669 ****
Karsten Hopp f2b8c1
--- 668,671 ----
Karsten Hopp f2b8c1
  {   /* Add new patch number below this line */
Karsten Hopp f2b8c1
+ /**/
Karsten Hopp f2b8c1
+     206,
Karsten Hopp f2b8c1
  /**/
Karsten Hopp f2b8c1
Karsten Hopp f2b8c1
-- 
Karsten Hopp f2b8c1
You can tune a file system, but you can't tuna fish
Karsten Hopp f2b8c1
							-- man tunefs
Karsten Hopp f2b8c1
Karsten Hopp f2b8c1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f2b8c1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f2b8c1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp f2b8c1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///