How does one instruct Lua(La)TeX -- specifically, the lua code invoked via a
\directlua directive -- to insert a non-ASCII unicode symbol, such as a "zero width non-joiner" symbol (code U+200C), into the text stream? I already know how to do this inside the body of a (Lua)LaTeX document -- I'd type something like
But how does one do this from inside lua code?
Addendum to (hopefully...) clarify what I'm trying to get done. If there's a string in the input stream such as
xyz123, I'd like to insert a specific character (this evil invisible ZWNJ character...) between
123, so that the input stream now is
I already have the code to (i) find all instances of
xyz123 in the input stream and (ii) find the insertion point for the ZWNJ character inside the string
xyz123. What I'm stuck with is trying to figure out how to insert the ZWNJ character (a "node" in luatex speak? of what type?) at the insertion location.