idn2_register_u8(3)
π idn2_register_u8 β the libidn2 bestie that registers your domain labels β¨
okay so you're here because idn2_register_u8 from libidn2 is calling your name and you need the tea. buckle up, this one's a whole vibe but honestly it's so good once it clicks π«Ά
β¨ SYNOPSIS β¨
#include <idn2.h>
int idn2_register_u8(const uint8_t * ulabel, const uint8_t * alabel,
uint8_t ** insertname, int flags);
π ARGUMENTS π
const uint8_t * ulabelβ your input, a zero-terminated UTF-8 and Unicode NFC string, orNULL. no cap, the NFC thing matters, we'll get to it πconst uint8_t * alabelβ your input, a zero-terminated ACE encoded string (you know, thexn--girlies), orNULL.uint8_t ** insertnameβ a freshly allocated output variable holding the name you're gonna register in DNS. it's giving main character, it's the whole point πint flagsβ optionalidn2_flagsto tweak the behaviour. β¨
πΈ DESCRIPTION πΈ
So what this actually does: it performs IDNA2008 register string conversion on the domain labels ulabel and alabel, exactly as described in section 4 of RFC 5891. and bestie, note this β the input ulabel must be encoded in UTF-8 and must be in Unicode NFC form. that's not a suggestion, that's the rule π
Wanna skip the manual NFC step? Pass IDN2_NFC_INPUT in flags and it'll convert the input ulabel to NFC form before doing any further processing. bless π
It is recommended that you supply both ulabel and alabel for better error checking, but supplying just one of them will work. and lowkey important: passing in only alabel is better than only ulabel. See RFC 5891 section 4 for more information. iykyk π
After version 0.11: insertname may be NULL to test conversion of src without allocating memory. cute, right? no malloc, no problem π§
π₯ RETURNS π₯
- On successful conversion,
IDN2_OKis returned π - When the given
ulabelandalabeldo not match each other,IDN2_UALABEL_MISMATCHis returned π¬ - When either of the input labels is too long,
IDN2_TOO_BIG_LABELis returned π - When
alabeldoes not appear to be a proper A-label,IDN2_INVALID_ALABELis returned π - or, you know, another error code is returned. there's always a plot twist.
π REPORTING BUGS π
Found something cursed? 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. slay, that's actually generous π
π 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, the 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/
ngl if you got this far you're literally an icon. go register that label bestie π
mwah π β this was page idn2_register_u8(3) from libidn2 version 2.3.8, and yes she ate, no crumbs left, periodt β¨
π¦ 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