bound check utf8 characters