idna_to_unicode_8z8z(3)

✨ idna_to_unicode_8z8z ✨

okay bestie, welcome to the libidn corner of the manual, this one's idna_to_unicode_8z8z and she's literally the "turn that weird punycode back into pretty Unicode" girlie πŸ’…


πŸŽ€ NAME πŸŽ€

idna_to_unicode_8z8z β€” an API function, no cap 🫢


🌸 SYNOPSIS 🌸

#include <idna.h>

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

like. that's the whole vibe. include the header, call the function, she does the thing ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const char * input β€” a zero-terminated UTF-8 string, bestie. zero-terminated. don't forget the \0 or she will simply keep reading and it's giving chaos πŸ’€
  • char ** output β€” a pointer to a newly allocated output UTF-8 string. newly allocated!! she's yours now, you have to free her, more on that below πŸŽ€
  • int flags β€” an Idna_flags value, like for example IDNA_ALLOW_UNASSIGNED or IDNA_USE_STD3_ASCII_RULES. pick your fighter πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so here's the tea: she converts a possibly ACE encoded domain name that's sitting in UTF-8 format into a UTF-8 string. that's the glow-up. ACE in, pretty UTF-8 out 🌈

the domain name may contain several labels, and they're separated by dots. yes like normal domain names. dots. plural labels. she handles it 🫢

⚠️ important bestie: the output buffer must be deallocated by the caller. that means YOU. she allocates it, you free it. that's the deal, no takesies backsies 😭

Return value: returns IDNA_SUCCESS on success, or an error code. simple as that. if it's not IDNA_SUCCESS, something went sideways and you should go look at your error code fr fr πŸ’…


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not her fault (jk, maybe it is). report bugs to <help-libidn@gnu.org> πŸ“§

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

and the GNU Libidn home page is right here: https://www.gnu.org/software/libidn/


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. so like. keep the receipts, that's all πŸŽ€


⭐ 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. iykyk 🧚

as an alternative you may obtain the manual from:

https://www.gnu.org/software/libidn/manual/

and that's the whole page bestie!! this was idna_to_unicode_8z8z(3) from libidn 1.44 β€” go convert some domain names, free your buffers, and slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from