HomeFreeBSD

libc: fix c*rtomb/mbrtoc*

Description

libc: fix c*rtomb/mbrtoc*

In 693f88c9da8d ("iconv_std: complete the IGNORE support"), we
more completely implemented
IGNORE, which changed the semantics of
ci_discard_ilseq. DISCARD_ILSEQ semantics are supposed to match
//IGNORE, so we really can't do much about that particular
incompatibility. This broke c*rtomb and mbrtoc* handling of invalid
sequences, but it turns out they don't want DISCARD_ILSEQ semantics at
all; they really want the subset that we call
_CITRUS_ICONV_F_HIDE_INVALID.

This restores the exact flow in iconv_std to precisely how it happened
prior to 693f88c9da8d.

PR: 265871
Fixes: 693f88c9da8d ("iconv_std: complete the //IGNORE support")
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D41513

Details

Provenance
kevansAuthored on Aug 23 2023, 3:40 AM
Differential Revision
D41513: libc: fix c*rtomb/mbrtoc*
Parents
rGc7df87209634: Regen
Branches
Unknown
Tags
Unknown