gnutls_idna_map(3)
π gnutls_idna_map(3) π
okay bestie so we're in the gnutls manual section and this one is literally about turning your cute lil' UTF-8 domain name into its IDNA glow-up. let's get into it β¨
β¨ NAME β¨
gnutls_idna_map β it's an API function and yes it's giving main character energy π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_idna_map(const char * input, unsigned ilen, gnutls_datum_t *
out, unsigned flags);
like. she's a function. she takes four things. she returns an int. no cap π
π¦ ARGUMENTS π¦
const char * inputβ this is your UTF-8 formatted domain name, bestie. the whole point. the moment. πunsigned ilenβ the length of the string you just handed over. yes you have to tell her. she's not psychic πgnutls_datum_t * outβ where the result goes! it's a null-terminated allocated string, so it's yours to keep (and yours to free, iykyk) π«Άunsigned flagsβ should be zero. that's it. that's the whole instruction. zero. π
π DESCRIPTION π
so the tea is: this function converts the UTF-8 domain name you gave it into its IDNA mapping, and drops it in an allocated variable for you. cute, right? π
β οΈ but bestie, listen β depending on the flags the gnutls library you're using was compiled with, the output of this function may vary. i.e., it may be IDNA2008, or it may be IDNA2003. the vibe check is not guaranteed consistent across builds, and that's just the reality we live in π
to force IDNA2008, you specify the flag GNUTLS_IDNA_FORCE_2008. slay. do that if you need to be sure β¨
and in the case where GnuTLS is not compiled with the necessary dependencies? you'll get GNUTLS_E_UNIMPLEMENTED_FEATURE back, which is her way of saying "gnutls is unable to perform the requested conversion." she's not being shady, she just literally cannot π
also note (fr fr): this function will return an empty string if an empty string is provided as input. empty in, empty out. iconic behavior honestly πΈ
π RETURNS π
GNUTLS_E_INVALID_UTF8_STRINGβ for invalid UTF-8 data π0β on success π
β SINCE β
3.5.8 β she's been here a minute, a real one π
π€ REPORTING BUGS π€
found a bug? don't just subtweet it, tell the devs:
- Report bugs to <bugs@gnutls.org>. π§
- Home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
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. periodt. π
π SEE ALSO π
The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit
https://www.gnutls.org/manual/
and that's the whole page bestie!! this was gnutls_idna_map(3) from the gnutls manual, version 3.8.13, dated 3.8.13 β thanks for reading, ily, go map some domain names π«Άβ¨ππ¦
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms