1idn2_lookup_u8(3)                   libidn2                  idn2_lookup_u8(3)
2
3
4

NAME

6       idn2_lookup_u8 - API function
7

SYNOPSIS

9       #include <idn2.h>
10
11       int  idn2_lookup_u8(const  uint8_t  *  src,  uint8_t ** lookupname, int
12       flags);
13

ARGUMENTS

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

DESCRIPTION

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

RETURNS

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

SINCE

59       0.1
60

SEE ALSO

62       The  full  documentation for libidn2 is maintained as a Texinfo manual.
63       If the info and libidn2 programs are properly installed at  your  site,
64       the command
65
66              info libidn2
67
68       should  give  you access to the complete manual.  As an alternative you
69       may obtain the manual from:
70
71              http://www.gnu.org/software/libidn/libidn2/manual/
72
73libidn2                              2.3.1                   idn2_lookup_u8(3)
Impressum