Opening this to track an issue I noticed while investigating: #13078
If files.encoding is set to a multi-byte encoding, and an invalid multi-byte sequence is detected, the translation would fail. This should instead skip the invalid sequece and continue trying to translate the encoding.