Re: [code] [textadept] 'Find' with Lua patterns does not support UTF-8

From: Mitchell <m.att.foicica.com>
Date: Fri, 25 Mar 2016 22:34:19 -0400 (EDT)

Hi Giovanni,

On Fri, 25 Mar 2016, Giovanni Salmeri wrote:

> Hello Mitchell
>
>> I had some time to experiment with luautf8, but I'm a bit uneasy
>> building it into Textadept at this time. However, I committed a change
>> [1] that does not assume 1-byte character widths in Lua pattern
>> searches.
>
> Am I missing something or there's some problem with this change? With
>
> pos, e = s + caps[next and 1 or 3] - 1, s + caps[2]
>
> all seems OK, but with
>
> pos = buffer:position_relative(s, caps[next and 1 or 3] - 1)
> e = buffer:position_relative(s, caps[2])
>
> a Lua search in a text with multi-byte characters does not seem to work
> properly.
>
> (By the way: I would be very glad if luautf8 were built into
> Textadept...)

Okay, I'll see what I can do.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 25 Mar 2016 - 22:34:19 EDT

This archive was generated by hypermail 2.2.0 : Sat 26 Mar 2016 - 06:29:04 EDT