1idn2_to_ascii_4z(3) libidn2 idn2_to_ascii_4z(3)
2
3
4
6 idn2_to_ascii_4z - API function
7
9 #include <idn2.h>
10
11 int idn2_to_ascii_4z(const uint32_t * input, char ** output, int
12 flags);
13
15 const uint32_t * input
16 zero terminated input Unicode (UCS-4) string.
17
18 char ** output
19 pointer to newly allocated zero-terminated output string.
20
21 int flags optional idn2_flags to modify behaviour.
22
24 Convert UCS-4 domain name to ASCII string using the IDNA2008 rules.
25 The domain name may contain several labels, separated by dots. The
26 output buffer must be deallocated by the caller.
27
28 The default behavior of this function (when flags are zero) is to apply
29 the IDNA2008 rules without the TR46 amendments. As the TR46 non-transi‐
30 tional processing is nowadays ubiquitous, when unsure, it is recom‐
31 mended to call this function with the IDN2_NONTRANSITIONAL and the
32 IDN2_NFC_INPUT flags for compatibility with other software.
33
34 Return value: Returns IDN2_OK on success, or error code.
35
37 2.0.0
38
40 Report bugs to <help-libidn@gnu.org>.
41 General guidelines for reporting bugs: https://www.gnu.org/gethelp/
42 Libidn2 home page: https://www.gnu.org/software/libidn2/
43
44
46 Copyright © 2002-2022 Simon Josefsson.
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright no‐
49 tice and this notice are preserved.
50
52 The full documentation for libidn2 is maintained as a Texinfo manual.
53 If the info and libidn2 programs are properly installed at your site,
54 the command
55
56 info libidn2
57
58 should give you access to the complete manual. As an alternative you
59 may obtain the manual from:
60
61 https://www.gnu.org/software/libidn/libidn2/manual/
62
63libidn2 2.3.3 idn2_to_ascii_4z(3)