idna_to_unicode_8z4z(3)

✨ NAME ✨

idna_to_unicode_8z4z β€” bestie, it's an API function πŸ’…


🌸 SYNOPSIS 🌸

#include <idna.h>

int idna_to_unicode_8z4z(const char * input, uint32_t ** output, int
flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * input β€” a zero-terminated UTF-8 string, periodt. Like, it has to end in a null byte or we're not doing this.
  • uint32_t ** output β€” a pointer to a newly allocated output Unicode string ✨ (yes, newly allocated, so somebody's gotta free it, and spoiler: that somebody is you).
  • int flags β€” an Idna_flags value, like IDNA_ALLOW_UNASSIGNED or IDNA_USE_STD3_ASCII_RULES. Pick your vibe, it changes how strict the whole thing is.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: this function converts a possibly ACE-encoded domain name that's sitting in UTF-8 format into a UCS-4 string. Glow-up, but for encodings πŸ’–

Your domain name can have several labels in it, and they're separated by dots. Classic. One dot, one label, moving on.

Real talk though: the output buffer must be deallocated by the caller. Not by the function, not by the library, by you. It's giving main character responsibility, and you're the main character now πŸ™ˆ

Return value: it returns IDNA_SUCCESS when everything slays, or an error code when it does not. No cap.


😭 REPORTING BUGS 😭

Found a bug? First of all, iykyk, it happens to the best of us. Report it to <help-libidn@gnu.org>.

General guidelines for reporting bugs live right here: https://www.gnu.org/gethelp/

And the GNU Libidn home page is over 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, go off, share it, remix it, just keep the receipts 🫢


⭐ 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. Iconic, honestly.

As an alternative you may obtain the manual from:

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

k bye bestie, this page was brought to you by libidn 1.44 β€” go read the source, it's literally right there πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from