Current File : //usr/local/apps/libidn2/share/man/man3/idn2_lookup_u8.3 |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
.TH "idn2_lookup_u8" 3 "2.3.4" "libidn2" "libidn2"
.SH NAME
idn2_lookup_u8 \- API function
.SH SYNOPSIS
.B #include <idn2.h>
.sp
.BI "int idn2_lookup_u8(const uint8_t * " src ", uint8_t ** " lookupname ", int " flags ");"
.SH ARGUMENTS
.IP "const uint8_t * src" 12
input zero\-terminated UTF\-8 string in Unicode NFC normalized form.
.IP "uint8_t ** 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 string
must be encoded in UTF\-8 and be in Unicode NFC form.
Pass \fBIDN2_NFC_INPUT\fP in \fIflags\fP to convert input to NFC form before
further processing. \fBIDN2_TRANSITIONAL\fP and \fBIDN2_NONTRANSITIONAL\fP
do already imply \fBIDN2_NFC_INPUT\fP.
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.
After version 2.0.3: \fBIDN2_USE_STD3_ASCII_RULES\fP disabled by default.
Previously we were eliminating non\-STD3 characters from domain strings
such as _443._tcp.example.com, or IPs 1.2.3.4/24 provided to libidn2
functions. That was an unexpected regression for applications switching
from libidn and thus it is no longer applied by default.
Use \fBIDN2_USE_STD3_ASCII_RULES\fP to enable that behavior again.
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 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