libc: iconv: add mb_cur_min for encoder traits


libc: iconv: add mb_cur_min for encoder traits

A future commit will actually implement //IGNORE so that applications
using base iconv can, e.g., sanitize UTF-8 strings. To do this, the
iconv_std module needs to be able to determine the minimum width for any
given encoding so that it can skip that many bytes in the input buffer.
This is mainly an issue for UTF-16 and UTF-32.

This commit bumps shlib versions to 5 for libiconv modules to reflect
the ABI change. It also fixes OptionalObsoleteFiles to remove the
libiconv modules if WITHOUT_ICONV is in use.

re: _ENCODING_MB_CUR_MIN, note that this file (citrus_stdenc_template.h)
is included at the bottom of an encoding *implementation*, so the
implementation is free to #define it prior. UTF1632 is a good example,
as it redefines the minimum to be a property on the encodinginfo, and
the minimum is set to 2 or 4 bytes for UTF-16 and UTF-32 respectively.

Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34344


kevansAuthored on Feb 22 2022, 7:12 AM
Differential Revision
D34344: libc: iconv: add mb_cur_min for encoder traits
rGc1f46b8fcb97: libc: iconv: push option ignore into citrus_iconv_open()