idna_to_ascii_lz(3)
π idna_to_ascii_lz(3) β the libidn glow-up π
okay bestie, sit down, hydrate, because we're about to talk about the manual page for idna_to_ascii_lz, straight out of libidn (we're on version 1.44 here, no cap). it's an API function, it's iconic, and honestly? it ate.
β¨ NAME β¨
idna_to_ascii_lz β API function. that's it, that's the name, she's simple, she's elegant, she converts stuff. π
πΈ SYNOPSIS πΈ
#include <idna.h>
int idna_to_ascii_lz(const char * input, char ** output, int flags);
like... look at her. three params. no drama. π¦
π«Ά ARGUMENTS π«Ά
const char * inputβ the zero terminated input string, encoded in the current locale's character set. so like, whatever your locale is vibing with at that moment, that's the encoding bestie. zero terminated, so don't forget your\0, that's her whole personality.char ** outputβ a pointer to the newly allocated output string. she's freshly allocated, she's new, she's got main character energy, and she is yours to free (more on that in a sec, don't panic).int flagsβ anIdna_flagsvalue. for exampleIDNA_ALLOW_UNASSIGNEDorIDNA_USE_STD3_ASCII_RULES. pick your fighter, or don't, whatever, it's your call. π
π DESCRIPTION π
so here's the tea: this function converts a domain name that's in the locale's encoding into an ASCII string. glow-up complete, periodt. β¨
and the domain name? it may contain several labels, separated by dots. so like, the whole thing, not just one little piece β she handles the full slay.
π¨ okay this is the important part, bestie: the output buffer must be deallocated by the caller. that's you. you're the caller. it's your responsibility. no one else is coming to free that memory for you, and if you don't, that's a leak and we do NOT want a leak, we want a clean free(). π₯
Return value: returns IDNA_SUCCESS on success, or an error code. so check her. don't just assume she worked, that's not the vibe. π«Ά
π REPORTING BUGS π
found a bug? not me manifesting it, but if it happens:
- 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/
go tell them, they want to know, they're literally asking. π
π 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. (translation: go off, remix it, just keep the receipts. that's the rule, and honestly? fair. π)
π¦ 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/
iykyk, the Texinfo manual is where the deep lore lives. go read her. πβ¨
and that's the whole page, bestie!! π this was idna_to_ascii_lz(3) from libidn, version 1.44, and it was a whole moment. now go free() your output buffer before you forget, I'm literally watching you. mwah ππΈπ¦π
π¦ 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