Current File : //usr/local/apps/libidn2/share/man/man3/idn2_lookup_ul.3 |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
.TH "idn2_lookup_ul" 3 "2.3.4" "libidn2" "libidn2"
.SH NAME
idn2_lookup_ul \- API function
.SH SYNOPSIS
.B #include <idn2.h>
.sp
.BI "int idn2_lookup_ul(const char * " src ", char ** " lookupname ", int " flags ");"
.SH ARGUMENTS
.IP "const char * src" 12
input zero\-terminated locale encoded string.
.IP "char ** lookupname" 12
newly allocated output variable with name to lookup in DNS.
.IP "int flags" 12
optional \fBidn2_flags\fP to modify behaviour.
.SH "DESCRIPTION"
Perform IDNA2008 lookup string conversion on domain name \fIsrc\fP , as
described in section 5 of RFC 5891. Note that the input is assumed
to be encoded in the locale's default coding system, and will be
transcoded to UTF\-8 and NFC normalized by this function.
Pass \fBIDN2_ALABEL_ROUNDTRIP\fP in \fIflags\fP to
convert any input A\-labels to U\-labels and perform additional
testing. This is default since version 2.2.
To switch this behavior off, pass IDN2_NO_ALABEL_ROUNDTRIP
Pass \fBIDN2_TRANSITIONAL\fP to enable Unicode TR46 transitional processing,
and \fBIDN2_NONTRANSITIONAL\fP to enable Unicode TR46 non\-transitional
processing.
Multiple flags may be specified by binary or:ing them together, for
example \fBIDN2_ALABEL_ROUNDTRIP\fP | \fBIDN2_NONTRANSITIONAL\fP.
The \fBIDN2_NFC_INPUT\fP in \fIflags\fP is always enabled in this function.
After version 0.11: \fIlookupname\fP may be NULL to test lookup of \fIsrc\fP without allocating memory.
.SH "RETURNS"
On successful conversion \fBIDN2_OK\fP is returned, if
conversion from locale to UTF\-8 fails then \fBIDN2_ICONV_FAIL\fP is
returned, if the output domain or any label would have been too
long \fBIDN2_TOO_BIG_DOMAIN\fP or \fBIDN2_TOO_BIG_LABEL\fP is returned, or
another error code is returned.
.SH "SINCE"
0.1
.SH "REPORTING BUGS"
Report bugs to <help-libidn@gnu.org>.
.br
General guidelines for reporting bugs: https://www.gnu.org/gethelp/
.br
Libidn2 home page: https://www.gnu.org/software/libidn2/
.SH COPYRIGHT
Copyright \(co 2002-2022 Simon Josefsson.
.br
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
.SH "SEE ALSO"
The full documentation for
.B libidn2
is maintained as a Texinfo manual. If the
.B info
and
.B libidn2
programs are properly installed at your site, the command
.IP
.B info libidn2
.PP
should give you access to the complete manual.
As an alternative you may obtain the manual from:
.IP
.B https://www.gnu.org/software/libidn/libidn2/manual/
.PP