99b86a7
To: vim-dev@vim.org
99b86a7
Subject: patch 7.1.116
99b86a7
Fcc: outbox
99b86a7
From: Bram Moolenaar <Bram@moolenaar.net>
99b86a7
Mime-Version: 1.0
99b86a7
Content-Type: text/plain; charset=ISO-8859-1
99b86a7
Content-Transfer-Encoding: 8bit
99b86a7
------------
99b86a7
99b86a7
Patch 7.1.116
99b86a7
Problem:    Cannot display Unicode characters above 0x10000.
99b86a7
Solution:   Remove the replacement with a question mark when UNICODE16 is not
99b86a7
	    defined. (partly by Nicolas Weber)
99b86a7
Files:	    src/screen.c
99b86a7
99b86a7
99b86a7
*** ../vim-7.1.115/src/screen.c	Thu Aug 30 13:51:52 2007
99b86a7
--- src/screen.c	Mon Sep 10 22:29:42 2007
99b86a7
***************
99b86a7
*** 2305,2313 ****
99b86a7
--- 2305,2315 ----
99b86a7
  			prev_c = u8c;
99b86a7
  #endif
99b86a7
  		    /* Non-BMP character: display as ? or fullwidth ?. */
99b86a7
+ #ifdef UNICODE16
99b86a7
  		    if (u8c >= 0x10000)
99b86a7
  			ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?';
99b86a7
  		    else
99b86a7
+ #endif
99b86a7
  			ScreenLinesUC[idx] = u8c;
99b86a7
  		    for (i = 0; i < Screen_mco; ++i)
99b86a7
  		    {
99b86a7
***************
99b86a7
*** 3678,3690 ****
99b86a7
  		    if ((mb_l == 1 && c >= 0x80)
99b86a7
  			    || (mb_l >= 1 && mb_c == 0)
99b86a7
  			    || (mb_l > 1 && (!vim_isprintc(mb_c)
99b86a7
! 							 || mb_c >= 0x10000)))
99b86a7
  		    {
99b86a7
  			/*
99b86a7
  			 * Illegal UTF-8 byte: display as <xx>.
99b86a7
  			 * Non-BMP character : display as ? or fullwidth ?.
99b86a7
  			 */
99b86a7
  			if (mb_c < 0x10000)
99b86a7
  			{
99b86a7
  			    transchar_hex(extra, mb_c);
99b86a7
  # ifdef FEAT_RIGHTLEFT
99b86a7
--- 3680,3697 ----
99b86a7
  		    if ((mb_l == 1 && c >= 0x80)
99b86a7
  			    || (mb_l >= 1 && mb_c == 0)
99b86a7
  			    || (mb_l > 1 && (!vim_isprintc(mb_c)
99b86a7
! # ifdef UNICODE16
99b86a7
! 							 || mb_c >= 0x10000
99b86a7
! # endif
99b86a7
! 							 )))
99b86a7
  		    {
99b86a7
  			/*
99b86a7
  			 * Illegal UTF-8 byte: display as <xx>.
99b86a7
  			 * Non-BMP character : display as ? or fullwidth ?.
99b86a7
  			 */
99b86a7
+ # ifdef UNICODE16
99b86a7
  			if (mb_c < 0x10000)
99b86a7
+ # endif
99b86a7
  			{
99b86a7
  			    transchar_hex(extra, mb_c);
99b86a7
  # ifdef FEAT_RIGHTLEFT
99b86a7
***************
99b86a7
*** 3692,3702 ****
99b86a7
--- 3699,3711 ----
99b86a7
  				rl_mirror(extra);
99b86a7
  # endif
99b86a7
  			}
99b86a7
+ # ifdef UNICODE16
99b86a7
  			else if (utf_char2cells(mb_c) != 2)
99b86a7
  			    STRCPY(extra, "?");
99b86a7
  			else
99b86a7
  			    /* 0xff1f in UTF-8: full-width '?' */
99b86a7
  			    STRCPY(extra, "\357\274\237");
99b86a7
+ # endif
99b86a7
  
99b86a7
  			p_extra = extra;
99b86a7
  			c = *p_extra;
99b86a7
***************
99b86a7
*** 6245,6250 ****
99b86a7
--- 6254,6260 ----
99b86a7
  		else
99b86a7
  		    u8c = utfc_ptr2char(ptr, u8cc);
99b86a7
  		mbyte_cells = utf_char2cells(u8c);
99b86a7
+ # ifdef UNICODE16
99b86a7
  		/* Non-BMP character: display as ? or fullwidth ?. */
99b86a7
  		if (u8c >= 0x10000)
99b86a7
  		{
99b86a7
***************
99b86a7
*** 6252,6257 ****
99b86a7
--- 6262,6268 ----
99b86a7
  		    if (attr == 0)
99b86a7
  			attr = hl_attr(HLF_8);
99b86a7
  		}
99b86a7
+ # endif
99b86a7
  # ifdef FEAT_ARABIC
99b86a7
  		if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
99b86a7
  		{
99b86a7
*** ../vim-7.1.116/src/version.c	Mon Sep 17 22:19:43 2007
99b86a7
--- src/version.c	Mon Sep 17 22:37:31 2007
99b86a7
***************
99b86a7
*** 668,669 ****
99b86a7
--- 668,671 ----
99b86a7
  {   /* Add new patch number below this line */
99b86a7
+ /**/
99b86a7
+     116,
99b86a7
  /**/
99b86a7
99b86a7
-- 
99b86a7
There can't be a crisis today, my schedule is already full.
99b86a7
99b86a7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
99b86a7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99b86a7
\\\        download, build and distribute -- http://www.A-A-P.org        ///
99b86a7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///