ICONVLIST(3)

πŸ“¦
version 115.100.1 Β· 2 versions
, in nixpkgs unstable

✨ ICONVLIST(3) ✨

ok so bestie, we're in the Standard C Library (libc, -lc) today and the function we're stanning is iconvlist β€” the iconv(3) girlies are gonna eat this one UP πŸ’… no cap


🌸 NAME 🌸

iconvlist β€” getting urself a whole list of character encodings that iconv(3) supports 🫢 literally the cheat sheet of every encoding your system fw


πŸŽ€ LIBRARY πŸŽ€

Standard C Library (libc, -lc)


✨ SYNOPSIS ✨

#include <iconv.h>

void
iconvlist(int (*do_one)(unsigned int *count, const char * const *names, void *arg),
    void *arg);

ok the signature is lowkey a mouthful but we'll get through it together, promise 🧚


πŸ¦‹ DESCRIPTION πŸ¦‹

so iconvlist() gets u a list of all the character encodings that the iconv(3) call supports. like, every single one your system knows about. iconic behavior honestly πŸ‘‘

and here's how it hands them to u: your do_one() callback function gets called, and the args go like this:

  • count β€” gets set to the number of encoding names found (the headcount, iykyk)
  • names β€” the actual list of supported encoding names
  • arg β€” this is literally just the arg argument u passed to iconvlist() in the first place. it's your little baton to pass custom data back and forth between whoever called iconvlist() and the callback function. main character energy for real πŸ”₯
🫢 heads up bestie: if an error happens, names will be NULL when do_one() gets called. so pls do a vibe check on that pointer, don't just assume it's valid 😭

πŸ’– SEE ALSO πŸ’–


⭐ STANDARDS ⭐

ok so real talk: the iconvlist function is a non-standard extension, ngl. it first showed up in the GNU implementation, and then FreeBSD 9.0 adopted it for compatibility's sake. so it's not in any standard, she just travels 🌈


🌸 AUTHORS 🌸

this manual page was written by Gabor Kovesdan <gabor@FreeBSD.org> β€” ty bestie for the docs 🫢


and that's the whole page diva πŸ’…βœ¨

Debian, October 20, 2009 β€” yeah she's an oldie but a goodie πŸŽ€ mwah πŸ’‹

πŸ“¦ where this page comes from
  • nixpkgs unstable: libiconv 115.100.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms