Loading ...
Sorry, an error occurred while loading the content.

328Re: Multibyte character message on vim60j

Expand Messages
  • Bram Moolenaar
    Oct 26, 2000
    • 0 Attachment
      Muraoka Taro wrote:

      > On Vim60j, there is a problem to show multibyte character as message.
      > I have fixed with this patch.
      >
      > When multibyte characters were printing as message,
      > variable c has value over 0xFF.
      > So function vim_isprintc() is always failure.
      > As a result multibyte character is not shown correctly.

      There is indeed a problem in this area. You fixed it in one location, but I
      was thinking of a more generic solution: Consider all characters above 0x100
      printable. I think that's correct, because there are no multi-byte control
      characters. The font will show a special character for non-existing
      multi-byte characters.

      Try the patch below instead. I have to do more work on this, because
      characters below 0x100 are now sometimes considered printable when they are
      not. Especially Unicode characters 0x80-0x9f.

      *** charset.c~ Mon Oct 16 11:49:24 2000
      --- charset.c Thu Oct 26 20:01:34 2000
      ***************
      *** 637,658 ****

      /*
      * return TRUE if 'c' is a valid file-name character
      */
      int
      vim_isfilec(c)
      int c;
      {
      ! return (c > 0 && c < 0x100 && (chartab[c] & CHAR_IF));
      }

      /*
      * return TRUE if 'c' is a printable character
      */
      int
      vim_isprintc(c)
      int c;
      {
      ! return (c > 0 && c < 0x100 && (chartab[c] & CHAR_IP));
      }

      /*
      --- 637,660 ----

      /*
      * return TRUE if 'c' is a valid file-name character
      + * Assume characters above 0x100 are valid (multi-byte).
      */
      int
      vim_isfilec(c)
      int c;
      {
      ! return (c >= 0x100 || (c > 0 && (chartab[c] & CHAR_IF)));
      }

      /*
      * return TRUE if 'c' is a printable character
      + * Assume characters above 0x100 are printable (multi-byte).
      */
      int
      vim_isprintc(c)
      int c;
      {
      ! return (c >= 0x100 || (c > 0 && (chartab[c] & CHAR_IP)));
      }

      /*

      --
      NEIL INNES PLAYED: THE FIRST SELF-DESTRUCTIVE MONK, ROBIN'S LEAST FAVORITE
      MINSTREL, THE PAGE CRUSHED BY A RABBIT, THE OWNER OF A DUCK
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    • Show all 3 messages in this topic