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