On 24/08/08 01:58, .幻想之诚 wrote:
> Is that a bug, Tony?
I think so; but I suppose Bram would know better than I what causes it.
A little trial and error seems to indicate that if the lower and upper
bounds differ by 256 or less (i.e. if there are at most 257 values in
range) the search proceeds OK, but if they differ by more than that we
get E16: Invalid range.
For instance:
/[一-伀]
(4E00 to 4F00) OK
/[一-企]
(4E00 to 4F01) error
/[丐-伐]
(4E10 to 4F10) OK
/[丐-休]
(4E10 to 4F11) error
I'm (trying to) redirect this thread to the vim_dev list.
Best regards,
Tony.
>
> On Sun, Aug 24, 2008 at 12:06 AM, Tony Mechelynck<
> [EMAIL PROTECTED]> wrote:
>
>> On 23/08/08 11:24, Anton Sharonov wrote:
>>> I can reproduce this as well (vim 7.2 patches 1-2, Linux OpenSUSE
>>> 10.2, big version with gtk2, +multi_byte +multi_lang,
>>> fenc=enc=utf8), neither of both patterns works:
>>>
>>> /[\u4e00-\u9fa5]
>>> /[不-限]
>>>
>>> But what is interesting, for characters which are belongs to
>>> russian unicode area it seems to be ok, so following is working
>>> properly:
>>>
>>> /[\u0430-\u044f]
>>> /[а-я]
>>>
>>> Normal search for Chinese characters, single or in group, seems
>>> as well to be ok, so following working properly as well:
>>>
>>> /不
>>> /限
>>> /不局限
>>>
>>>
>>> Sample text:
>>>
>> ----------------------------------------------------------------------------
>>> русский текст
>>> вим - это класс
>>> 算法并不局限于计算机和网络
>>>
>> ----------------------------------------------------------------------------
>>> Anton.
>> I confirm the above, but what puzzles me even more is that with a
>> smaller range, such as
>>
>> /[一-丅]
>>
>> i.e. U+4E00 to U+4E05, the search works correctly, with no error.
>>
>>
>> Best regards,
>> Tony.
>> --
>> The basic idea behind malls is that they are more convenient than
>> cities. Cities contain streets, which are dangerous and crowded and
>> difficult to park in. Malls, on the other hand, have parking lots,
>> which are also dangerous and crowded and difficult to park in, but --
>> here is the big difference -- in mall parking lots, THERE ARE NO
>> RULES. You're allowed to do anything. You can drive as fast as you
>> want in any direction you want. I was once driving in a mall parking
>> lot when my car was struck by a pickup truck being driven backward by a
>> squat man with a tattoo that said "Charlie" on his forearm, who got out
>> and explained to me, in great detail, why the accident was my fault,
>> his reasoning being that he was violent and muscular, whereas I was
>> neither. This kind of reasoning is legally valid in mall parking
>> lots.
>> -- Dave Barry, "Christmas Shopping: A Survivor's Guide"
>>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---