utf8 terminal hooks