Fix validation by specifying the encoding.