Many applications and libraries (e.g., libarchive) assume GNU behavior,
and this particular divergence at least breaks part of the libarchive
test suite. The difference is the behavior when an input character
cannot be represented in the output character set: CITRUS followed along
with POSIX and returned > 0 to indicate the number of invalid
characters, while GNU chose to just halt immediately and EILSEQ it.
While conformance is great, the reality is that most of our ported
software using iconv isn't written against the spec. The previous
behavior can be restored with the ICONV_SET_ILSEQ_INVALID iconvctl(3).
PR: 294577
Relnotes: yes (probably)
Obtained from: https://github.com/apple-oss-distributions/libiconv