__ICONV_GET_LIST(3)

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

πŸ’– __iconv_get_list(3) β€” from the Library Functions Manual ✨

okay bestie, so this page lives in the Library Functions Manual and it's literally all about getting a whole list of the character encodings your iconv(3) can handle. it's giving backstage-pass energy 🎟️


πŸŽ€ LIBRARY πŸŽ€

it's part of the Standard C Library β€” link with libc, i.e. -lc. classic, iconic, no notes πŸ’…


🌸 SYNOPSIS 🌸

#include <iconv.h>

int
__iconv_get_list(char ***names, size_t count, bool paired);

void
__iconv_free_list(char **names, size_t count);

πŸ¦‹ DESCRIPTION πŸ¦‹

so __iconv_get_list() is the main character here πŸ’« it grabs you a list of character encodings that the iconv(3) call actually supports. the names of those encodings get stashed in names, and the number of entries gets stashed in count. easy.

and if paired is true? 🫢 the list gets arranged into canonical/alias name pairs β€” like a little buddy system for your encodings, iykyk.

then there's __iconv_free_list(), which is basically the cleanup crew 🧹 it frees the memory that got allocated during your call to __iconv_get_list(). please don't skip this step, bestie, that's a leak and leaks are not cute 😭


⭐ RETURN VALUES ⭐

when it slays: __iconv_get_list() returns 0 and sets the names and count arguments for you. βœ…

when it does not slay: -1 gets returned, and errno is set to tell you what the error actually was πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

go read those too, the lore is deep πŸ“š


πŸ‘‘ STANDARDS πŸ‘‘

real talk: __iconv_get_list and __iconv_free_list are non-standard interfaces β€” they're not part of any proper standard, they just showed up in the implementation of the Citrus Project. and the Citrus Project's iconv implementation got adopted into FreeBSD 9.0. so that's the whole origin story, periodt 🌈


πŸ“ AUTHORS πŸ“

this manual page was written by Gabor Kovesdan <gabor@FreeBSD.org> β€” thank you for your service, king πŸ«‘πŸ’œ


and that's the page!! brought to you by Debian, dated October 20, 2009, under the __ICONV_GET_LIST(3) banner ✨ mwah, go free your lists responsibly πŸ’…πŸŽ€

πŸ“¦ 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