Encodes text as UTF-8 for one parser input chunk.
immutable input event.
text or control sequence to encode.