Safely handle invalid UTF-8 data by letting the parser fail