[luatex] problem with slnunicode's find
Stephan Hennig
mailing_list at arcor.de
Wed Mar 3 12:01:51 CET 2010
Am 03.03.2010 11:49, schrieb Stephan Hennig:
> Here is an example:
A revisited example (a pair of parentheses was missing in line 6):
str = "ä#Ö"
print("str: ", str)
-- This considers 'Ö' a single upper-case letter, i.e.,
-- 'Ö' is one (character) long.
print('match("(%u)"): ', unicode.utf8.match(str, "(%u)"))
-- Like len does.
print('len("Ö"): ', unicode.utf8.len("Ö"))
-- This returns the byte position of 'Ö' in the string, i.e.,
-- it considers the length of 'ä' as two (bytes).
print('match("()%u"): ', unicode.utf8.match(str, "()%u"))
-- Unlike len.
print('len("ä"): ', unicode.utf8.len("ä"))
> >texlua empty.lua
> str: ä#Ö
> match("(%u)"): Ö
> len("Ö"): 1
> match("()%u"): 4
> len("ä"): 1
Best regards,
Stephan Hennig
More information about the luatex
mailing list