idn2_to_unicode_8z8z(3)

πŸ“¦
version 2.3.8 Β· 5 versions
, in alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ idn2_to_unicode_8z8z ✨

okay bestie, welcome to libidn2's cutest little decoder πŸ’– this page is the manual for idn2_to_unicode_8z8z(3), which is an API function β€” yes, the manual name is idn2_to_unicode_8z8z(3) and it lives in the libidn2 manual, section 3. iykyk 🫢


🌈 SYNOPSIS 🌈

#include <idn2.h>

int idn2_to_unicode_8z8z(const char * input, char ** output, int flags);

she's giving "one include, one call, go off" ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * input β€” the input, fr fr. it's a zero-terminated UTF-8 string, that's the vibe.
  • char ** output β€” the output πŸ’… this one's a newly allocated UTF-8 output string, so like, she's fresh out of the box, nobody else has touched her.
  • int flags β€” currently unused πŸ™ˆ literally just sitting there. iconic behaviour honestly, but bestie, do not invent meaning for her. she does nothing right now.

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do?? she converts a possibly ACE encoded domain name in UTF-8 format into a UTF-8 string β€” that's the punycode decoding step, bestie πŸ¦‹ think xn--... walks in, human-readable Unicode walks out. main character transformation, no cap.

the output buffer will be zero-terminated ✨ and it must be deallocated by the caller β€” that's you, that's your job, do not ghost her after you're done or she will just sit there in memory forever πŸ’€

and here's the lil trick that's lowkey so good:

output may be NULL to test lookup of input without allocating memory. πŸ‘‘

so if you just wanna know "does this even resolve / is this even valid" and you don't need the actual string, pass NULL and she won't allocate a single byte. efficient queen 🌸


⭐ SINCE ⭐

2.0.0 β€” she's been here since 2.0.0, an OG πŸŽ€


πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, bestie 😭 report it to <help-libidn@gnu.org>.

general guidelines for reporting bugs live at: https://www.gnu.org/gethelp/

and the Libidn2 home page is right here: https://www.gnu.org/software/libidn2/


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 actual legal text, and yes it's genuinely that chill β€” slay.)


🌸 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/

okay that's the whole page, bestie!! 🫢 this was libidn2, version 2.3.8, serving you idn2_to_unicode_8z8z(3) realness. go decode something cute. mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from