idn2_to_unicode_8zlz(3)
π idn2_to_unicode_8zlz β bestie, we're decoding punycode π
okay so real talk, you found yourself in the libidn2 manual (page idn2_to_unicode_8zlz(3), section 3, library functions, iykyk) and you're about to learn the single most iconic little function for turning weird xn---looking ACE domain names back into something a human can actually read. no cap. let's get into it β¨
πΈ NAME πΈ
idn2_to_unicode_8zlz β it's an API function, babe. that's the whole name. that's the vibe.
π¦ SYNOPSIS π¦
#include <idn2.h>
int idn2_to_unicode_8zlz(const char * input, char ** output, int flags);
three args, one int back, extremely demure, extremely mindful π
β¨ ARGUMENTS β¨
const char * inputβ your input string, and it's zero-terminated UTF-8. that's the requirement. respect it πchar ** outputβ this is where the new output string goes. it's newly allocated and it comes out in the current locale's character set. so like, whatever your locale is feeling today, that's the encoding you get π¦int flagsβ currently unused. literally just sitting there. main character energy but no lines π
π DESCRIPTION π
okay so here's the tea: this function takes a domain name that might be ACE encoded, sitting in UTF-8 format, and converts it into a string encoded in the current locale's character set. that conversion? that's punycode decoding. we're un-mangling it. we're giving it back its glow π₯
the output buffer is zero-terminated and β listen β it must be deallocated by the caller. that's on you. nobody's cleaning that up for you, bestie. free your memory. π«Ά
also, tiny slay:outputmay beNULLif you just wanna test the lookup ofinputwithout allocating any memory at all. vibe check only, no commitment π
β SINCE β
2.0.0 β an elder. been here. iconic since day one π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- Report bugs to help-libidn@gnu.org.
- General guidelines for reporting bugs: https://www.gnu.org/gethelp/
- Libidn2 home page: https://www.gnu.org/software/libidn2/
π COPYRIGHT π
Copyright Β© 2002-2025 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. (yes that's the whole thing, verbatim, because legal text is not the place for creative liberties π)
π SEE ALSO π
The full documentation for libidn2 is maintained as a Texinfo manual. If the info and libidn2 programs are properly installed at your site, this command
info libidn2
should give you access to the complete manual. β¨
As an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/libidn2/manual/
and that's the whole page, babe π«Ά this was libidn2 version 2.3.8, page idn2_to_unicode_8zlz(3), brought to you by the fine folks maintaining libidn2 β go decode something, you ate π
π
π¦ where this page comes from
- alpine 3.23: libidn2-doc 2.3.8-r0 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- alpine 3.24: libidn2-doc 2.3.8-r0 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- arch rolling: libidn2 2.3.8-1 Β· GPL2 AND LGPL3
- debian trixie: libidn2-dev 2.3.8-2 Β· GPL-3.0-or-later
- fedora 43: libidn2-devel 2.3.8-2.fc43 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- fedora 43: libidn2-devel 2.3.8-2.fc43 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- fedora 44: libidn2-devel 2.3.8-3.fc44 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- fedora 44: libidn2-devel 2.3.8-3.fc44 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- opensuse-leap 16.0: libidn2-devel 2.3.8-160000.2.2 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- opensuse-leap 16.0: libidn2-devel 2.3.8-160000.2.2 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- opensuse-leap 16.0: libidn2-devel 2.3.8-160000.2.2 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- opensuse-leap 16.0: libidn2-devel 2.3.8-160000.2.2 Β· (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later
- ubuntu questing: libidn2-dev 2.3.8-4
- ubuntu resolute: libidn2-dev 2.3.8-4build1 Β· GPL-3.0-or-later
- ubuntu stonking: libidn2-dev 2.3.8-5 Β· 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