Deal with utf8 encoding