Patrick Gundlach wrote:
Hi Stephan,
-- NOTE: find positions are in bytes for all ctypes! -- use
ascii.sub to cut found ranges!
Hmm, neither do I want to cut something nor do I have a range
available. I just want to count. Attached is my attempt of a utf8
aware find function based on the utf8 aware parts of slnunicode.
Luatex itself has an internal UTF-8 counting function. At some point
(don't know when but before 1.0) the internal Unicode library will
replace slnunicode, and I will make sure that it exports a counter
as well.
Best wishes,
Taco