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

Re: MMCoreTextView has chars converting problem

Expand Messages
  • Bram Moolenaar
    ... It s possible to get any byte sequence in some situations. In this case it comes from an external program. This should be handled gracefully. The illegal
    Message 1 of 3 , Nov 18, 2010
      Björn Winckler wrote:

      > This looks like a bug in core Vim...all internal text should be UTF8.
      >
      > Can you make simple step by step instructions on how to reproduce?
      >
      > I think the fact that text is not UTF8 should be brought up on vim_dev.

      It's possible to get any byte sequence in some situations. In this case
      it comes from an external program. This should be handled gracefully.
      The illegal bytes should be handled as unprintable characters. But
      since 'isprint' is an option the lower layers may still get some.

      > On 17 nov 2010, at 16.13, Kazuki Sakamoto <sakamoto@...> wrote:
      >
      > > Hi,
      > >
      > > I heard and confirmed a problem of MMCoreTextView.m. The problem will
      > > be occurred by non UTF-8 texts. Vim does send non UTF-8 texts by some
      > > commands.
      > > For example,
      > > :set makeprg=shell_script_to_put_non_UTF-8_texts_like_CP932_encoding_texts
      > > :make
      > > MacVim will get an SIGSEGV exception at the following lines.
      > >
      > > // Convert UTF-8 chars to UTF-16
      > > CFStringRef sref = CFStringCreateWithBytesNoCopy(NULL, s, len,
      > > kCFStringEncodingUTF8, false, kCFAllocatorNull);
      > > CFIndex unilength = CFStringGetLength(sref);
      > >
      > > sref is NULL when Vim sends non UTF-8 text.
      > >
      > > sakamoto
      > >
      > > --
      > > You received this message from the "vim_mac" maillist.
      > > Do not top-post! Type your reply below the text you are replying to.
      > > For more information, visit http://www.vim.org/maillist.php
      >
      > --
      > You received this message from the "vim_mac" maillist.
      > Do not top-post! Type your reply below the text you are replying to.
      > For more information, visit http://www.vim.org/maillist.php

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.