idna_to_ascii_4z(3)
β¨ idna_to_ascii_4z(3) β the libidn glow-up β¨
okay bestie, gather round, because this one is a little function with big main character energy π
it lives in libidn, and its whole job is turning your fancy Unicode domain name into boring-but-necessary ASCII. it's literally called idna_to_ascii_4z. iconic. let's get into it π«Ά
πΈ NAME πΈ
idna_to_ascii_4z β it's an API function, bestie. that's the whole vibe β¨
π SYNOPSIS π
#include <idna.h>
int idna_to_ascii_4z(const uint32_t * input, char ** output, int flags);
π¦ ARGUMENTS π¦
const uint32_t * inputβ your input Unicode string, zero terminated. like, it has to end in a zero or she's not coming to the party π«char ** outputβ a pointer to the newly allocated output string. note: newly allocated, so somebody's gotta clean up after her (spoiler: it's you, see below π)int flagsβ anIdna_flagsvalue, for exampleIDNA_ALLOW_UNASSIGNEDorIDNA_USE_STD3_ASCII_RULES. pick your fighter β¨
π DESCRIPTION π
Convert a UCS-4 domain name to an ASCII string. that's it, that's the gig π
the domain name can contain several labels, separated by dots. so like, multiple lil segments, all chillin' with . between them π
π¨ IMPORTANT: the output buffer must be deallocated by the caller. she does not clean up after herself, bestie. that memory is your responsibility now. no cap.
Return value: returns IDNA_SUCCESS on success, or an error code. so always check the return value, fr fr π
π REPORTING BUGS π
found a bug? spill the tea, but spill it to the right place:
- 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.
(translation: share it, remix it, whatever β just keep the notice. slay π)
π 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, this 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/
that's the whole page, bestie π this was libidn, version 1.44, and honestly? she ate. periodt. β¨ππ¦
π¦ 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