| Previous | Next |
| ENOPROTOOPT | ESTRPIPE |
EILSEQ
The failing unit is an encoded byte sequence
EILSEQ is not a generic text-processing error. It says that the conversion or interpretation layer encountered bytes that are illegal for the selected encoding, or that cannot be converted under the active locale and conversion rules. The same byte sequence can be valid in a different encoding.
Log the declared source and destination encodings, the byte offset, and a bounded hex sample around the failure. Do not “fix” data by silently replacing bytes unless the application contract explicitly allows lossy conversion; replacement can corrupt identifiers, paths, signatures, and serialized protocol fields.
Useful distinctions
- Distinguish invalid data from a truncated final sequence; streaming decoders often need to retain an incomplete suffix for the next chunk.
- Verify locale and codec selection at process startup, not only the input’s visual appearance.
- Keep byte offsets in the original buffer so the producer can reproduce the exact failure.
References
- Apple XNU: Darwin errno definitions
- POSIX: iconv() conversion errors
- Apple system-call reference: EILSEQ
Looking for a different code? Search another status or error code.
