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
Unknown Object (File)
Thu, Apr 18, 4:14 PM
Unknown Object (File)
Tue, Apr 9, 5:43 AM
Unknown Object (File)
Mon, Apr 8, 10:51 PM
Unknown Object (File)
Feb 9 2024, 9:57 PM
Unknown Object (File)
Jan 31 2024, 1:28 AM
Unknown Object (File)
Jan 31 2024, 1:28 AM
Unknown Object (File)
Jan 29 2024, 3:52 PM
Unknown Object (File)
Jan 29 2024, 3:48 PM
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.