Try this to add UTF-8 checking.