translate to utf8 before logging