[FIXED JENKINS-16222] Ignore invalid encodings when reading files.