On 13/01/09 16:31, Bram Moolenaar wrote:
> 
> 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.
> 

The "replace-from" character is a fullwidth full stop, Unicode codepoint
U+3002, represented in UTF-8 as E3 80 82. (So it's its _second_ byte
which is 0x80).

Note that this mail is not in UTF-8 but (like the rest of this thread)
in ISO-2022-JP. If you want to, i can send it again in UTF-8.


Best regards,
Tony.
-- 
Etymology, n.:
        Some early etymological scholars came up with derivations that
were hard for the public to believe.  The term "etymology" was formed
from the Latin "etus" ("eaten"), the root "mal" ("bad"), and "logy"
("study of").  It meant "the study of things that are hard to swallow."
                -- Mike Kellen

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

Reply via email to