1idn2_to_ascii_lz(3) libidn2 idn2_to_ascii_lz(3)
2
3
4
6 idn2_to_ascii_lz - API function
7
9 #include <idn2.h>
10
11 int idn2_to_ascii_lz(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 a domain name in locale's encoding to ASCII string using the
24 IDNA2008 rules. The domain name may contain several labels, separated
25 by dots. The 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
34 IDN2_OK on success, or error code. Same as described in
35 idn2_lookup_ul() documentation.
36
38 2.0.0
39
41 The full documentation for libidn2 is maintained as a Texinfo manual.
42 If the info and libidn2 programs are properly installed at your site,
43 the command
44
45 info libidn2
46
47 should give you access to the complete manual. As an alternative you
48 may obtain the manual from:
49
50 http://www.gnu.org/software/libidn/libidn2/manual/
51
52libidn2 2.2.0 idn2_to_ascii_lz(3)