handle utf8 input