idna_to_unicode_lzlz(3)

πŸ’– idna_to_unicode_lzlz(3) πŸ’–

okay so bestie, this one lives in the libidn manual (section 3, the library-call girlies) and it's genuinely one of the most useful little gremlins in the whole toolbox. sit down, grab a boba, let's talk. πŸ§‹βœ¨


🌸 NAME 🌸

idna_to_unicode_lzlz β€” an API function, and yes the name is a mouthful, we love her anyway πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <idna.h>

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

literally just three little args and a dream, no cap πŸ¦‹


✨ ARGUMENTS ✨

  • const char * input β€” a zero-terminated string encoded in the current locale's character set. that's it, that's the vibe. zero-terminated, locale-flavoured, periodt.
  • char ** output β€” a pointer to a newly allocated output string, also encoded in the current locale's character set. it's giving "here's your gift, but you have to clean up after it" 🎁 (more on that in a sec).
  • int flags β€” an Idna_flags value, like IDNA_ALLOW_UNASSIGNED or IDNA_USE_STD3_ASCII_RULES. flags are the little switches that change the whole mood, iykyk.

πŸ’œ DESCRIPTION πŸ’œ

so what does she do. she takes a domain name β€” which might be ACE encoded β€” that's sitting in the locale's character set, and converts it into a string encoded in the current locale's character set. glow-up, but for domain names. ✨

the domain name can have several labels in it, separated by dots. so like, multiple little chunks, all dotted up, she handles it. no stress. 🌈

🚨 important, bestie, do not skip this: the output buffer must be deallocated by the caller. that's you. yes you. she allocates it, but she is NOT cleaning it up. that's the deal. free your memory or she will haunt you. 😭

Return value: returns IDNA_SUCCESS on success, or an error code. so check it. always check it. πŸ™ˆ


😀 REPORTING BUGS 😀

found a bug? first of all, relatable. second of all, report it 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/

go, be a good citizen, tell them what broke 🫢


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. iconic behaviour honestly, no royalties, just vibes 🌸


πŸ¦‹ 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, the command

info libidn

should give you access to the complete manual. as an alternative you may obtain the manual from:

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

okay that's the whole page, you ate it, you understood it, you're basically a libidn main character now πŸ‘‘ this was page idna_to_unicode_lzlz(3) from libidn version 1.44 β€” mwah, love you, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from