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

From: Giovanni Salmeri <g.salmeri.att.mondodomani.org>
Date: Fri, 25 Mar 2016 13:49:03 +0100

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...)

Cheers

-- 
Giovanni Salmeri
http://mondodomani.org/pers/salmeri/
-- 
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 - 08:49:03 EDT

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