1idn2_lookup_u8(3) libidn2 idn2_lookup_u8(3)
2
3
4
6 idn2_lookup_u8 - API function
7
9 #include <idn2.h>
10
11 int idn2_lookup_u8(const uint8_t * src, uint8_t ** lookupname, int
12 flags);
13
15 const uint8_t * src
16 input zero-terminated UTF-8 string in Unicode NFC normal‐
17 ized form.
18
19 uint8_t ** lookupname
20 newly allocated output variable with name to lookup in DNS.
21
22 int flags optional idn2_flags to modify behaviour.
23
25 Perform IDNA2008 lookup string conversion on domain name src , as de‐
26 scribed in section 5 of RFC 5891. Note that the input string must be
27 encoded in UTF-8 and be in Unicode NFC form.
28
29 Pass IDN2_NFC_INPUT in flags to convert input to NFC form before fur‐
30 ther processing. IDN2_TRANSITIONAL and IDN2_NONTRANSITIONAL do already
31 imply IDN2_NFC_INPUT.
32
33 Pass IDN2_ALABEL_ROUNDTRIP in flags to convert any input A-labels to
34 U-labels and perform additional testing. This is default since version
35 2.2. To switch this behavior off, pass IDN2_NO_ALABEL_ROUNDTRIP
36
37 Pass IDN2_TRANSITIONAL to enable Unicode TR46 transitional processing,
38 and IDN2_NONTRANSITIONAL to enable Unicode TR46 non-transitional pro‐
39 cessing.
40
41 Multiple flags may be specified by binary or:ing them together.
42
43 After version 2.0.3: IDN2_USE_STD3_ASCII_RULES disabled by default.
44 Previously we were eliminating non-STD3 characters from domain strings
45 such as _443._tcp.example.com, or IPs 1.2.3.4/24 provided to libidn2
46 functions. That was an unexpected regression for applications switching
47 from libidn and thus it is no longer applied by default. Use
48 IDN2_USE_STD3_ASCII_RULES to enable that behavior again.
49
50 After version 0.11: lookupname may be NULL to test lookup of src
51 without allocating memory.
52
54 On successful conversion IDN2_OK is returned, if the output domain or
55 any label would have been too long IDN2_TOO_BIG_DOMAIN or
56 IDN2_TOO_BIG_LABEL is returned, or another error code is returned.
57
59 0.1
60
62 Report bugs to <help-libidn@gnu.org>.
63 General guidelines for reporting bugs: https://www.gnu.org/gethelp/
64 Libidn2 home page: https://www.gnu.org/software/libidn2/
65
66
68 Copyright © 2002-2022 Simon Josefsson.
69 Copying and distribution of this file, with or without modification,
70 are permitted in any medium without royalty provided the copyright no‐
71 tice and this notice are preserved.
72
74 The full documentation for libidn2 is maintained as a Texinfo manual.
75 If the info and libidn2 programs are properly installed at your site,
76 the command
77
78 info libidn2
79
80 should give you access to the complete manual. As an alternative you
81 may obtain the manual from:
82
83 https://www.gnu.org/software/libidn/libidn2/manual/
84
85libidn2 2.3.4 idn2_lookup_u8(3)