[luatex] problem with slnunicode's find

Taco Hoekwater taco at elvenkind.com
Tue Mar 2 14:16:35 CET 2010



Stephan Hennig wrote:
> 
>> Note: The string library functions find etc. are not Unicode-aware.
>> In cases where this is required (i. e. because the pattern used for
>> searching contains characters above code point 127), the
>> corresponding functions from unicode.utf8 should be used.
> 
> is a bit misleading, since just unicode.utf8.find is again not
> Unicode-aware.  The same applies for the empty capture () in match and
> gmatch, BTW.  The output of
> 
>   str = "abcde"
>   print(unicode.utf8.match(str, "()e"))
>   str = "Äabcde"
>   print(unicode.utf8.match(str, "()e"))
> 
> is 5 and 7.  The second one is obviously wrong.

Can you suggest a rewording of that paragraph?




More information about the luatex mailing list