10.18.3 iconv_open
¶
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/iconv_open.html
Gnulib module: iconv, iconv_open, iconv_open-utf
Portability problems fixed by either Gnulib module iconv
or iconv_open
:
- GNU libiconv is not found if installed in $PREFIX/lib.
Portability problems handled by either Gnulib module iconv
or iconv_open
(in the sense that HAVE_ICONV
does not get defined if the system’s
iconv_open
function has this problem):
- No converter from EUC-JP to UTF-8 is provided on some platforms:
HP-UX 11.
Portability problems fixed by Gnulib module iconv_open
:
- This function recognizes only non-standard aliases for many encodings (not
the IANA registered encoding names) on many platforms:
AIX 5.1, HP-UX 11, Solaris 11 2010-11, z/OS.
Portability problems fixed by Gnulib module iconv_open-utf
:
- This function does not support the encodings UTF-16BE, UTF-16LE, UTF-32BE,
UTF-32LE on many platforms:
AIX 5.1, HP-UX 11.
Portability problems not fixed by Gnulib:
- This function is missing on some platforms:
FreeBSD 6.0, OpenBSD 7.5, Minix 3.1.8, Cygwin 2.9, mingw, MSVC 14, Android 8.1,
when GNU libiconv is not installed.
- For some encodings A and B, this function cannot convert directly from A to B,
although an indirect conversion from A through UTF-8 to B is possible. This
occurs on some platforms: Solaris 11 2010-11.
Gnulib provides a higher-level
facility
striconveh
(a wrapper around iconv
) that deals with
this problem.
- The set of supported encodings and conversions is system dependent.