Added routines to convert to utf8 text with optional ansi, xterm256, or
xterm24bit escape sequences.