__ICONV_GET_LIST(3)
π __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
- Copyright (c) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
- Copyright (C) 2001-2004 by the Institute of
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms