Yasuhiro Matsumoto wrote:

> Hi. bram and all.
> 
> I found a bug about treating multi-byte and special characters in command 
> line.
> ex:
>   :set enc=utf-8
>   :command! SubJapanesePeriodToDot %s/。/./g
> 
> "。" mean period in japanese utf-8. and it has 0x80 in leading byte.
> but replace_termcodes treat 0x80 as K_SPECIAL and break some
> multi-byte characters in command line above.
> Below is a patch for this problem. Please check and include.

I cannot reproduce the problem.  The example you give does not contain a
0x80 byte.  Did it get mangled in the message?  I see <Esc>$B!#<Esc>(B,
where the <Esc> are one byte escape characters, 0x1b.
If I type what you sent then it works without a problem.

A valid UTF-8 character can never have 0x80 as a leading byte, this is
only for further bytes.

-- 
If the Universe is constantly expanding, why can't I ever find a parking space?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui