refactor UTF-32 checker