Re: iconv changes

From: Kyle Evans <kevans_at_freebsd.org>
Date: Thu, 19 May 2022 16:24:59 UTC
On Tue, Feb 22, 2022 at 10:34 AM Kyle Evans <kevans@freebsd.org> wrote:
>
> Hello!
>
> Results of `git log` were somewhat inconclusive, so I'm casting a bit
> of a wider net here; I've got four changes just posted to Phabricator
> for iconv and iconv modules that could use some third party review.
> These largely pertain to //IGNORE support:
>
>  - https://reviews.freebsd.org/D34342 ("iconv: only conditionally use
> ICONV_SET_DISCARD_ILSEQ")
>  - https://reviews.freebsd.org/D34343 ("libc: iconv: push option
> ignore into citrus_iconv_open()")
>  - https://reviews.freebsd.org/D34344 ("libc: iconv: add mb_cur_min
> for encoder traits")
>  - https://reviews.freebsd.org/D34345 ("iconv_std: complete the
> //IGNORE support")
>
> The short version is that //IGNORE is only partially implemented at
> the moment if you consider the behavior it was trying to model: GNU
> libiconv. With GNU libiconv, you can use it to, e.g., sanitize a UTF-8
> string by removing illegal sequences rather than truncating.
>
> These reviews aim to fix it so that it works the same for our
> libiconv, which would previously only ignore EILSEQ that arise as a
> result of csmapper failures and not those that arise in initial
> mbrtowc.
>

3-month ping: any takers?