make sure input is utf8