Imporve utf8 checking.