idna_to_unicode_44i(3)

✨ idna_to_unicode_44i ✨

okay bestie, gather round, we're reading a libidn man page together and honestly? it's giving niche-but-iconic. this one is idna_to_unicode_44i(3) from libidn πŸ’–


🌸 NAME 🌸

idna_to_unicode_44i β€” API function


πŸŽ€ SYNOPSIS πŸŽ€

#include <idna.h>

int idna_to_unicode_44i(const uint32_t * in, size_t inlen, uint32_t *
out, size_t * outlen, int flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • const uint32_t * in β€” the input array, and it's full of unicode code points 🫢
  • size_t inlen β€” how long that input array is (again: unicode code points)
  • uint32_t * out β€” the output array, also unicode code points, we love a matching set πŸ’…
  • size_t * outlen β€” lowkey does two jobs: on the way in it's the maximum size of the output array of unicode code points, and on the way out it's the actual size of the output array of unicode code points. she contains multitudes ✨
  • int flags β€” an Idna_flags value, like IDNA_ALLOW_UNASSIGNED or IDNA_USE_STD3_ASCII_RULES

πŸ’– DESCRIPTION πŸ’–

The ToUnicode operation takes a sequence of Unicode code points that make up one domain label and hands you back a sequence of Unicode code points. that's the whole vibe. and here's the plot twist: if the input sequence is a label in ACE form, then the result is an equivalent internationalized label that is not in ACE form. otherwise? the original sequence is returned unaltered. no notes, she just gives it back πŸŽ€

ToUnicode never fails. like, ever. if any step fails, then the original input sequence is returned immediately in that step. periodt. πŸ’…

The Punycode decoder can never output more code points than it inputs β€” but Nameprep can, and therefore ToUnicode can. and ngl, note that the number of octets needed to represent a sequence of code points depends on the particular character encoding used. so that's a whole thing πŸ‘€

The inputs to ToUnicode are a sequence of code points, the AllowUnassigned flag, and the UseSTD3ASCIIRules flag. The output of ToUnicode is always a sequence of Unicode code points. always. πŸ’–

Return value: Returns Idna_rc error condition, but it must only be used for debugging purposes. The output buffer is always guaranteed to contain the correct data according to the specification (sans malloc induced errors). NB! This means that you normally ignore the return code from this function, as checking it means breaking the standard.

bestie listen to me. checking that return code literally means breaking the standard. the output buffer is the main character here, the return code is just a lil debug buddy. do not be the person who checks it 😭

πŸ™ˆ REPORTING BUGS πŸ™ˆ

Report bugs to <help-libidn@gnu.org>.

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

GNU Libidn home page: 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.


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

and that's the whole page, no cap 🧚 this was libidn version 1.44, idna_to_unicode_44i(3), and we ate. go forth and ToUnicode responsibly πŸ’œβ­πŸ“

πŸ“¦ where this page comes from