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

wrong handling Chinese quote character

Expand Messages
  • moo moo
    Chinese quote “ and many other characters let s say [a] is the cursor on character a for line: - [a]bc“1” l - a[b]c“1” l - ab[c]“1” l -
    Message 1 of 3 , Apr 13 8:58 PM
    • 0 Attachment
      Chinese quote “ and many other characters
      let's say "[a]" is the cursor on character "a"
      for line:
      -> [a]bc“1”
      l
      -> a[b]c“1”
      l
      -> ab[c]“1”
      l
      -> abc[“]1”
      l
      -> abc[“]1” <- this is wrong, the cursor should move onto "1" already
      l
      -> abc“[1]” <- now here we are on "1"

      “ is actually 1 character, vim somehow treat it as 2 characters

      terminal: mintty
      os: cygwin or gentoo linux
      LANG=zh_CN.UTF-8
      vim encoding=utf-8 (reproduced with GBK too)
      vim fileencoding=utf-8 (reproduced with GBK too)

      utf-8 code of the quote
      $ echo -n “ | xxd
      0000000: e280 9c ...
      utf-8 code of the testing text
      $ echo -n abc“1” | xxd
      0000000: 6162 63e2 809c 31e2 809d abc...1...

      and btw, when i start "v" into visual mode after the "wrongly handled"
      character, some character is redrawn partly in the line, it's redrawn
      in wrong column (x position). i think that's the same problem. we'll
      discuss that later if it's still reproduced after this bug is fixed

      --
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php

      To unsubscribe, reply using "remove me" as the subject.
    • winterTTr
      ... try to: set ambiwidth=double ... -- You received this message from the vim_multibyte maillist. For more information, visit
      Message 2 of 3 , Apr 14 1:13 AM
      • 0 Attachment
        On Wed, Apr 14, 2010 at 11:58 AM, moo moo <moo.wejoin@gmail.com> wrote:
        Chinese quote “ and many other characters
        let's say "[a]" is the cursor on character "a"
        for line:
        -> [a]bc“1”
        l
        -> a[b]c“1”
        l
        -> ab[c]“1”
        l
        -> abc[“]1”
        l
        -> abc[“]1” <- this is wrong, the cursor should move onto "1" already
        l
        -> abc“[1]” <- now here we are on "1"

        “ is actually 1 character, vim somehow treat it as 2 characters

        terminal: mintty
        os: cygwin or gentoo linux
        LANG=zh_CN.UTF-8
        vim encoding=utf-8 (reproduced with GBK too)
        vim fileencoding=utf-8 (reproduced with GBK too)

        utf-8 code of the quote
        $ echo -n “ | xxd
        0000000: e280 9c                                  ...
        utf-8 code of the testing text
        $ echo -n abc“1” | xxd
        0000000: 6162 63e2 809c 31e2 809d                 abc...1...

        and btw, when i start "v" into visual mode after the "wrongly handled"
        character, some character is redrawn partly in the line, it's redrawn
        in wrong column (x position). i think that's the same problem. we'll
        discuss that later if it's still reproduced after this bug is fixed

        try to:
        set ambiwidth=double


        --
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php

        To unsubscribe, reply using "remove me" as the subject.

        --
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • moo moo
        ... cool, it s a feature not a bug. thanks -- You received this message from the vim_multibyte maillist. For more information, visit
        Message 3 of 3 , Apr 14 4:00 AM
        • 0 Attachment
          >
          > try to:
          > set ambiwidth=double
          cool, it's a feature not a bug. thanks

          --
          You received this message from the "vim_multibyte" maillist.
          For more information, visit http://www.vim.org/maillist.php

          To unsubscribe, reply using "remove me" as the subject.
        Your message has been successfully submitted and would be delivered to recipients shortly.