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 Report bugs to <help-libidn@gnu.org>.
42 General guidelines for reporting bugs: https://www.gnu.org/gethelp/
43 Libidn2 home page: https://www.gnu.org/software/libidn2/
44
45
47 Copyright © 2002-2022 Simon Josefsson.
48 Copying and distribution of this file, with or without modification,
49 are permitted in any medium without royalty provided the copyright no‐
50 tice and this notice are preserved.
51
53 The full documentation for libidn2 is maintained as a Texinfo manual.
54 If the info and libidn2 programs are properly installed at your site,
55 the command
56
57 info libidn2
58
59 should give you access to the complete manual. As an alternative you
60 may obtain the manual from:
61
62 https://www.gnu.org/software/libidn/libidn2/manual/
63
64libidn2 2.3.4 idn2_to_ascii_lz(3)