1idna_to_ascii_4i(3) libidn idna_to_ascii_4i(3)
2
3
4
6 idna_to_ascii_4i - API function
7
9 #include <idna.h>
10
11 int idna_to_ascii_4i(const uint32_t * in, size_t inlen, char * out, int
12 flags);
13
15 const uint32_t * in
16 input array with unicode code points.
17
18 size_t inlen
19 length of input array with unicode code points.
20
21 char * out output zero terminated string that must have room for at
22 least 63 characters plus the terminating zero.
23
24 int flags an Idna_flags value, e.g., IDNA_ALLOW_UNASSIGNED or
25 IDNA_USE_STD3_ASCII_RULES.
26
28 The ToASCII operation takes a sequence of Unicode code points that make
29 up one domain label and transforms it into a sequence of code points in
30 the ASCII range (0..7F). If ToASCII succeeds, the original sequence and
31 the resulting sequence are equivalent labels.
32
33 It is important to note that the ToASCII operation can fail. ToASCII
34 fails if any step of it fails. If any step of the ToASCII operation
35 fails on any label in a domain name, that domain name MUST NOT be used
36 as an internationalized domain name. The method for deadling with this
37 failure is application-specific.
38
39 The inputs to ToASCII are a sequence of code points, the AllowUnas‐
40 signed flag, and the UseSTD3ASCIIRules flag. The output of ToASCII is
41 either a sequence of ASCII code points or a failure condition.
42
43 ToASCII never alters a sequence of code points that are all in the
44 ASCII range to begin with (although it could fail). Applying the
45 ToASCII operation multiple times has exactly the same effect as apply‐
46 ing it just once.
47
48 Return value: Returns 0 on success, or an Idna_rc error code.
49
51 Report bugs to <bug-libidn@gnu.org>.
52 General guidelines for reporting bugs: http://www.gnu.org/gethelp/
53 GNU Libidn home page: http://www.gnu.org/software/libidn/
54
55
57 Copyright © 2002-2016 Simon Josefsson.
58 Copying and distribution of this file, with or without modification,
59 are permitted in any medium without royalty provided the copyright
60 notice and this notice are preserved.
61
63 The full documentation for libidn is maintained as a Texinfo manual.
64 If the info and libidn programs are properly installed at your site,
65 the command
66
67 info libidn
68
69 should give you access to the complete manual. As an alternative you
70 may obtain the manual from:
71
72 http://www.gnu.org/software/libidn/manual/
73
74libidn 1.34 idna_to_ascii_4i(3)