stringprep_locale_to_utf8(3)
β¨ stringprep_locale_to_utf8 β the glow-up your strings deserve β¨
okay bestie, welcome to libidn's little conversion station π this is the <stringprep.h> girlie that takes your string out of whatever dusty locale charset it's been living in and gives it the full UTF-8 makeover. she's an API function, she's iconic, she's literally here to help.
πΈ SYNOPSIS πΈ
#include <stringprep.h>
char * stringprep_locale_to_utf8(const char * str);
π ARGUMENTS π
const char * strβ the input string, zero terminated, no cap. that's the thing you're sending to the salon π
π¦ DESCRIPTION π¦
so the way this works is: she converts a string that's encoded in the locale's character set into UTF-8, and she does it by using stringprep_convert(). that's the whole vibe. no extra steps, no drama, just the conversion β¨
Return value: she hands you back a newly allocated zero-terminated string β that's your str, transcoded into UTF-8. brand new memory, freshly allocated, main character energy π
heads up bestie: newly allocated means somebody (you π) has to free it eventually. she's not doing that part for you.
π REPORTING BUGS π
found something cursed? report bugs to <help-libidn@gnu.org> π«Ά
the 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 π
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.
(that's fr fr the whole license situation β no royalty, just keep the notice π)
π 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. obsessed with that for you πβ¨
as an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/manual/
and that's the whole page, bestie π©· this one's from libidn, version 1.44 β go convert something pretty. periodt. π ππ¦
π¦ where this page comes from
- arch rolling: libidn 1.44-1 Β· GPL3 AND LGPL
- epel 10: libidn-devel 1.44-1.el10_3 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libidn-dev 1.44-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms