> Pablo Rodriguez > 17. September 2015 18:47 > Dear list, > > I have the following sample: > > \startluacode > function document.gouppercase(str) > tex.print(str:upper()) > end > \stopluacode > > \unexpanded\def\MyUpper#1% > {\ctxlua{document.gouppercase("#1")}} > > \starttext > \doif{\MyUpper{adfalkjfaeñf}}{\MyUpper{aDFAlkjfaeñf}}{equal}{unequal} > > \ctxlua{if string.upper("adfalkjfaeñf") == string.upper("aDFAlkjfaeñf") > then tex.print("equal") else tex.print("unequal") end} > \stoptext > > Why are are the first two strings unequal? You can’t use a unexpandable (which you created with \unexpanded) in ConTeXts \doifXXX commands. PS. You need \doifelse and not \doif. Wolfgang