catch utf8 errors