de40f00
To: vim-dev@vim.org
de40f00
Subject: Patch 7.2.102
de40f00
Fcc: outbox
de40f00
From: Bram Moolenaar <Bram@moolenaar.net>
de40f00
Mime-Version: 1.0
de40f00
Content-Type: text/plain; charset=ISO-8859-1
de40f00
Content-Transfer-Encoding: 8bit
de40f00
------------
de40f00
de40f00
Patch 7.2.102 (after 7.2.100)
de40f00
Problem:    When 'encoding' is "utf-8" a BOM at the start of a Vim script is
de40f00
	    not removed. (Tony Mechelynck)
de40f00
Solution:   When no conversion is taking place make a copy of the line without
de40f00
	    the BOM.
de40f00
Files:	    src/ex_cmds2.c
de40f00
de40f00
de40f00
*** ../vim-7.2.101/src/ex_cmds2.c	Wed Feb  4 17:49:46 2009
de40f00
--- src/ex_cmds2.c	Thu Feb  5 20:41:56 2009
de40f00
***************
de40f00
*** 3013,3018 ****
de40f00
--- 3013,3020 ----
de40f00
  	/* Found BOM; setup conversion, skip over BOM and recode the line. */
de40f00
  	convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
de40f00
  	p = string_convert(&cookie.conv, firstline + 3, NULL);
de40f00
+ 	if (p == NULL)
de40f00
+ 	    p = vim_strsave(firstline + 3);
de40f00
  	if (p != NULL)
de40f00
  	{
de40f00
  	    vim_free(firstline);
de40f00
*** ../vim-7.2.101/src/version.c	Wed Feb  4 18:34:54 2009
de40f00
--- src/version.c	Thu Feb  5 20:44:55 2009
de40f00
***************
de40f00
*** 678,679 ****
de40f00
--- 678,681 ----
de40f00
  {   /* Add new patch number below this line */
de40f00
+ /**/
de40f00
+     102,
de40f00
  /**/
de40f00
de40f00
-- 
de40f00
CVS sux, men don't like commitment
de40f00
de40f00
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
de40f00
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
de40f00
\\\        download, build and distribute -- http://www.A-A-P.org        ///
de40f00
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///