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

2666Multibyte bugs

Expand Messages
  • Tony Mechelynck
    Apr 2, 2010
    • 0 Attachment
      Hi Bram,

      1. (Minor bug): On this system (gvim 7.2.411, Huge version with
      GTK2-GNOME GUI), typing Ctrl-K in Insert mode followed by two spaces
      doesn't give the expected result: instead of U+00A0 ("Alt-space", the
      non-breaking space) I get U+E000, a CJK character. Ctrl-K NS works

      2. U+E000 is displayed in gvim as CJK halfwidth. Shouldn't it be fullwidth?

      3. "\<Char-nnnn>" gives wrong results for some Unicode codepoints. I
      tried to find examples and counterexamples, as follows (in the comment
      after the :echo statements, the UTF-8 expansion in hex):

      :echo "«\<Char-0x40>" | " 40
      :echo "«\<Char-0x80>" | " C2 80
      :echo "«\<Char-0x100>»" | " C4 80
      :echo "«\<Char-0x101>»" | " C4 81
      :echo "«\<Char-0x180>»" | " C6 80
      :echo "«\<Char-0x190>»" | " C6 90
      :echo "«\<Char-0x1A0>»" | " C6 A0
      :echo "«\<Char-0x1C0>»" | " C7 80
      :echo "«\<Char-0x4E00>»" | " E4 B8 80
      :echo "«\<Char-0x4E01>»" | " E4 B8 81
      :echo "«\<Char-0x4E20>»" | " E4 B8 A0
      :echo "«\<Char-0x4E40>»" | " E4 B9 80
      :echo "«\<Char-0xE000>»" | " EE 80 80
      :echo "«\<Char-57344>»" | " EE 80 80
      :echo "«\<Char-0xE001>»" | " EE 80 81
      :echo "«\<Char-0xE040>»" | " EE 81 80

      This seems to indicate that the extra bytes 0xFE 0x58 appear after any
      0x80 in the UTF-8 expansion of the character. (I added the « »
      characters to "bound" the display so that any extra whitespace would be
      visible but they change nothing to the bug.)

      The bug does not occur after Ctrl-V u in Insert mode or when using
      <Char-...> in an Insert-mode mapping. It does when using "\<Char-...>"
      in other commands than :echo. Note the following:

      :let j = "\<Char-0xE000>"
      :let j
      j <ee><80><fe>X<80><fe>X

      (where <Ctrl-R> and <Enter> are one keystroke each, not counting
      modifiers). Apparently gvim tries to interpret 0x80 0xFE as a "special
      key", and "resolves" it (incorrectly) as <t_þ>.

      Two very big files were loaded when I first noticed bug #3, but
      restarting gvim without them reproduced the bug again with the same
      spurious bytes.

      Best regards,
      Alimony is a system by which, when two people make a mistake, one of
      them keeps paying for it.
      -- Peggy Joyce

      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.
    • Show all 8 messages in this topic