1idn2_to_ascii_8z(3) libidn2 idn2_to_ascii_8z(3)
2
3
4
6 idn2_to_ascii_8z - API function
7
9 #include <idn2.h>
10
11 int idn2_to_ascii_8z(const char * input, char ** output, int flags);
12
14 const char * input
15 zero terminated input UTF-8 string.
16
17 char ** output
18 pointer to newly allocated output string.
19
20 int flags optional idn2_flags to modify behaviour.
21
23 Convert UTF-8 domain name to ASCII string using the IDNA2008 rules.
24 The domain name may contain several labels, separated by dots. The
25 output buffer must be deallocated by the caller.
26
27 The default behavior of this function (when flags are zero) is to apply
28 the IDNA2008 rules without the TR46 amendments. As the TR46 non-transi‐
29 tional processing is nowadays ubiquitous, when unsure, it is recom‐
30 mended to call this function with the IDN2_NONTRANSITIONAL and the
31 IDN2_NFC_INPUT flags for compatibility with other software.
32
33 Return value: Returns IDN2_OK on success, or error code.
34
36 2.0.0
37
39 The full documentation for libidn2 is maintained as a Texinfo manual.
40 If the info and libidn2 programs are properly installed at your site,
41 the command
42
43 info libidn2
44
45 should give you access to the complete manual. As an alternative you
46 may obtain the manual from:
47
48 http://www.gnu.org/software/libidn/libidn2/manual/
49
50libidn2 2.2.0 idn2_to_ascii_8z(3)