Validate UTF-8 in scanner