Patch:	Disallow 'encoding' in a modeline to avoid invalid chars
	in others buffers. It is possible to change 'encoding'
	in secure mode.

*** ../vim-7.2.065/src/option.c	Sat Nov 29 05:14:52 2008
--- src/option.c	Tue Dec 09 08:52:16 2008
***************
*** 430,435 ****
--- 430,436 ----
  #define P_INSECURE     0x400000L/* option was set from a modeline */
  #define P_PRI_MKRC     0x800000L/* priority for :mkvimrc (setting option has
  				   side effects) */
+ #define P_NOMODELINE  0x1000000L/* cannot change in modeline */
  
  #define ISK_LATIN1  (char_u *)"@,48-57,_,192-255"
  
***************
*** 964,970 ****
      {"edcompatible","ed",   P_BOOL|P_VI_DEF,
  			    (char_u *)&p_ed, PV_NONE,
  			    {(char_u *)FALSE, (char_u *)0L}},
!     {"encoding",    "enc",  P_STRING|P_VI_DEF|P_RCLR,
  #ifdef FEAT_MBYTE
  			    (char_u *)&p_enc, PV_NONE,
  			    {(char_u *)ENC_DFLT, (char_u *)0L}
--- 965,971 ----
      {"edcompatible","ed",   P_BOOL|P_VI_DEF,
  			    (char_u *)&p_ed, PV_NONE,
  			    {(char_u *)FALSE, (char_u *)0L}},
!     {"encoding",    "enc",  P_STRING|P_VI_DEF|P_RCLR|P_NOMODELINE,
  #ifdef FEAT_MBYTE
  			    (char_u *)&p_enc, PV_NONE,
  			    {(char_u *)ENC_DFLT, (char_u *)0L}
***************
*** 4120,4126 ****
  		goto skip;
  
  	    /* Disallow changing some options from modelines */
! 	    if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE))
  	    {
  		errmsg = (char_u *)_("E520: Not allowed in a modeline");
  		goto skip;
--- 4121,4127 ----
  		goto skip;
  
  	    /* Disallow changing some options from modelines */
! 	    if ((opt_flags & OPT_MODELINE) && ((flags & P_SECURE) || (flags & P_NOMODELINE)))
  	    {
  		errmsg = (char_u *)_("E520: Not allowed in a modeline");
  		goto skip;

*** ../vim-7.2.065/runtime/doc/options.txt	Fri Nov 28 12:37:14 2008
--- runtime/doc/options.txt	Tue Dec 09 09:15:14 2008
***************
*** 2364,2370 ****
  	NOTE: Changing this option will not change the encoding of the
  	existing text in Vim.  It may cause non-ASCII text to become invalid.
  	It should normally be kept at its default value, or set when Vim
! 	starts up.  See |multibyte|.  To reload the menus see |:menutrans|.
  
  	NOTE: For GTK+ 2 it is highly recommended to set 'encoding' to
  	"utf-8".  Although care has been taken to allow different values of
--- 2364,2371 ----
  	NOTE: Changing this option will not change the encoding of the
  	existing text in Vim.  It may cause non-ASCII text to become invalid.
  	It should normally be kept at its default value, or set when Vim
! 	starts up.  See |multibyte|.  This option cannot be set from 
! 	a |modeline|.  To reload the menus see |:menutrans|.
  
  	NOTE: For GTK+ 2 it is highly recommended to set 'encoding' to
  	"utf-8".  Although care has been taken to allow different values of
