idna_to_ascii_8z(3)
β¨ idna_to_ascii_8z(3) β¨
okay so bestie, we're in the libidn corner of your manual and this one is literally the glow-up function. it's an API function, and it's the one that takes your cute lil' UTF-8 domain name and turns it into that ASCII baddie. π
π¦ SYNOPSIS π¦
#include <idna.h>
int idna_to_ascii_8z(const char * input, char ** output, int flags);
π ARGUMENTS π
const char * inputβ the zero terminated input UTF-8 string, aka your domain name before the makeover. it's aconst char *so like, hands off, we're just reading her. π«Άchar ** outputβ a pointer to the newly allocated output string. yes bestie, newly allocated, which means somebody has to free it and that somebody is you. πint flagsβ anIdna_flagsvalue, like for exampleIDNA_ALLOW_UNASSIGNEDorIDNA_USE_STD3_ASCII_RULES. pick your vibe, these are the knobs you get to twist. β¨
π DESCRIPTION π
Convert a UTF-8 domain name to an ASCII string. that's it, that's the whole serve. π
the domain name may contain several labels, separated by dots β so like, www.example.com energy, multiple little segments all doing their thing, and this function handles the whole fit. π
π¨ not me forgetting the most important part: the output buffer must be deallocated by the caller. that's you. the caller. you have to free it. this is not a drill, this is a memory leak waiting to happen if you ghost it. π
Return value: Returns IDNA_SUCCESS on success, or an error code. so like, check it. if it's not IDNA_SUCCESS, something went wrong and you should probably look at it instead of pretending you didn't see it. π
π₯ REPORTING BUGS π₯
found a bug? don't be shy, tell the libidn girlies:
- Report bugs to <help-libidn@gnu.org>.
- General guidelines for reporting bugs: https://www.gnu.org/gethelp/
- GNU Libidn home page: https://www.gnu.org/software/libidn/
π COPYRIGHT π
Copyright Β© 2002-2026 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
(so like, yes you can share it, just keep the receipts bestie, keep the copyright notice and this notice exactly where they are. periodt. π)
πΈ SEE ALSO πΈ
The full documentation for libidn is maintained as a Texinfo manual. If the info and libidn programs are properly installed at your site, the command
info libidn
should give you access to the complete manual. As an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/manual/
and that's the whole page, bestie π§β¨ this one's from libidn 1.44, dated idna_to_ascii_8z(3) β go forth and ASCII-ify responsibly, and for the love of everything, free() that output. π
π¦ where this page comes from
- arch rolling: libidn 1.44-1 Β· GPL3 AND LGPL
- epel 10: libidn-devel 1.44-1.el10_3 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libidn-dev 1.44-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms