Page MenuHomeFreeBSD

libc: iconv: push option ignore into citrus_iconv_open()
ClosedPublic

Authored by kevans on Feb 22 2022, 5:25 PM.

Details

Summary

Make it vaguely aware of options in the sense that it now knows that it
can zap any trailing //. It now copies the entire string in realsrc and
realdst, then terminates them at the options.

bsd_iconv_open can now stop trying to allocate memory just for this
purpose, and the new version is technically more correct. GNU libiconv
will ignore options on the in codeset and still do the right thing.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

thj added inline comments.
lib/libc/iconv/citrus_iconv.c
129–134

I'd really like to fix this to be "NetBSD doesn't do this either", do you know if the NetBSD tools don't allow pass through or if they don't parse bytes when the encodings are the same?

lib/libc/iconv/citrus_iconv.c
129–134

I double checked; they do not allow for this pass-through with equivalent encodings either.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 11 2022, 4:44 PM
This revision was automatically updated to reflect the committed changes.