Page MenuHomeFreeBSD

libc: iconv: add mb_cur_min for encoder traits
ClosedPublic

Authored by kevans on Feb 22 2022, 5:25 PM.
Tags
None
Referenced Files
F102998673: D34344.diff
Tue, Nov 19, 3:56 PM
Unknown Object (File)
Sun, Nov 17, 5:56 PM
Unknown Object (File)
Sun, Nov 17, 11:46 AM
Unknown Object (File)
Sun, Nov 17, 11:18 AM
Unknown Object (File)
Sun, Nov 10, 2:22 PM
Unknown Object (File)
Wed, Oct 23, 6:28 PM
Unknown Object (File)
Oct 11 2024, 7:26 AM
Unknown Object (File)
Oct 11 2024, 7:10 AM
Subscribers

Details

Summary

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.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44537
Build 41425: arc lint + arc unit

Event Timeline

thj added inline comments.
lib/libc/iconv/citrus_stdenc_template.h
54

I can't track down the resolution of encoding info. This define always being one seems to exclude the 'otherwise specified' part of the comment, is the minimum changed somewhere else?

lib/libc/iconv/citrus_stdenc_template.h
54

These are all kind of whacky, but this file is actually part of the module template and only gets #include'd at the bottom of a module.c, so the module is free to #define it and we'll use that instead below. The below methods are declared in the module's .h, which is what libiconv uses.

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