Raise an exception for invalid UTF-8