1idn2_lookup_ul(3)                   libidn2                  idn2_lookup_ul(3)
2
3
4

NAME

6       idn2_lookup_ul - API function
7

SYNOPSIS

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

ARGUMENTS

14       const char * src
15                   input zero-terminated locale encoded string.
16
17       char ** lookupname
18                   newly allocated output variable with name to lookup in DNS.
19
20       int flags   optional idn2_flags to modify behaviour.
21

DESCRIPTION

23       Perform  IDNA2008 lookup string conversion on domain name  src , as de‐
24       scribed in section 5 of RFC 5891.  Note that the input is assumed to be
25       encoded  in  the locale's default coding system, and will be transcoded
26       to UTF-8 and NFC normalized by this function.
27
28       Pass IDN2_ALABEL_ROUNDTRIP in  flags to convert any input  A-labels  to
29       U-labels  and perform additional testing. This is default since version
30       2.2.  To switch this behavior off, pass IDN2_NO_ALABEL_ROUNDTRIP
31
32       Pass IDN2_TRANSITIONAL to enable Unicode TR46 transitional  processing,
33       and  IDN2_NONTRANSITIONAL  to enable Unicode TR46 non-transitional pro‐
34       cessing.
35
36       Multiple flags may be specified by binary or:ing them together, for ex‐
37       ample IDN2_ALABEL_ROUNDTRIP | IDN2_NONTRANSITIONAL.
38
39       The IDN2_NFC_INPUT in  flags is always enabled in this function.
40
41       After  version  0.11:   lookupname  may  be NULL to test lookup of  src
42       without allocating memory.
43

RETURNS

45       On successful conversion IDN2_OK is returned, if conversion from locale
46       to  UTF-8  fails then IDN2_ICONV_FAIL is returned, if the output domain
47       or  any  label  would  have  been  too  long   IDN2_TOO_BIG_DOMAIN   or
48       IDN2_TOO_BIG_LABEL is returned, or another error code is returned.
49

SINCE

51       0.1
52

REPORTING BUGS

54       Report bugs to <help-libidn@gnu.org>.
55       General guidelines for reporting bugs: https://www.gnu.org/gethelp/
56       Libidn2 home page: https://www.gnu.org/software/libidn2/
57
58
60       Copyright © 2002-2022 Simon Josefsson.
61       Copying  and  distribution  of this file, with or without modification,
62       are permitted in any medium without royalty provided the copyright  no‐
63       tice and this notice are preserved.
64

SEE ALSO

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