__ICONV_GET_LIST(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… __ICONV_GET_LIST(3) β€” the iconv roster page

okay bestie, so this one lives in the Library Functions Manual section of the iconv(3) family, and it's literally the page that tells you which character encodings your system is fluent in. group-chat energy, but make it encoding theory πŸ¦‹


🌸 NAME 🌸

__iconv_get_list, __iconv_free_list β€” retrieving a list of character encodings supported by iconv(3)

πŸŽ€ LIBRARY πŸŽ€

Standard C Library (libc, -lc) β€” the classic, the icon, the one you link with -lc. periodt.

✨ 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 function that goes and gets you a list of all the character encodings that the iconv(3) call supports. like a guest list for the encoding party πŸŽ‰ The list of the encoding names will be stored in names, and the number of the entries is stored in count. slay.

And if the paired variable is true, the list will be arranged into canonical/alias name pairs β€” so each official name is hanging out right next to its aliases, bestie style 🫢

Then there's __iconv_free_list(), which is literally just there to free the allocated memory that got allocated during the call of __iconv_get_list(). clean up after yourself, it's giving responsible queen energy πŸ‘‘

ngl, this is not a function you call for fun β€” you call it, you read it, you free it. don't be the girl who leaks memory πŸ™ˆ

πŸ”₯ RETURN VALUES πŸ”₯

Upon successful completion, __iconv_get_list() returns 0 and sets the names and count arguments. icon behavior, honestly.

Otherwise, -1 is returned and errno is set to indicate the error. 😭 so check that errno, fr fr.

πŸ‘€ SEE ALSO πŸ‘€

⭐ STANDARDS ⭐

The __iconv_get_list and __iconv_free_list functions are non-standard interfaces β€” yep, not standard, they're built different πŸ’… β€” which appeared in the implementation of the Citrus Project. And the iconv implementation of the Citrus Project was adopted in FreeBSD 9.0. history was made, no cap πŸ“

🌈 AUTHORS 🌈

This manual page was written by Gabor Kovesdan <gabor@FreeBSD.org>. ty for your service, king πŸ‘‘


and that's the whole page, bestie β€” mwah πŸ’–

sign-off vibes: this one came from Debian, dated October 20, 2009, and it's filed under __ICONV_GET_LIST(3). iconic, historic, encoding-tastic πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from