punycode_decode.3   [plain text]


.\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
.TH "punycode_decode" 3 "0.6.14" "libidn" "libidn"
.SH NAME
punycode_decode \- decode Punycode to Unicode
.SH SYNOPSIS
.B #include <punycode.h>
.sp
.BI "int punycode_decode(size_t " input_length ", const char [] " input ", size_t * " output_length ", punycode_uint [] " output ", unsigned char [] " case_flags ");"
.SH ARGUMENTS
.IP "size_t input_length" 12
The number of ASCII code points in the \fIinput\fP array.
.IP "const char [] input" 12
An array of ASCII code points (0..7F).
.IP "size_t * output_length" 12
The caller passes in the maximum number of code
points that it can receive into the \fIoutput\fP array (which is also
the maximum number of flags that it can receive into the
\fIcase_flags\fP array, if \fIcase_flags\fP is not a \fBNULL\fP pointer).  On
successful return it will contain the number of code points
actually output (which is also the number of flags actually
output, if case_flags is not a null pointer).  The decoder will
never need to output more code points than the number of ASCII
code points in the input, because of the way the encoding is
defined.  The number of code points output cannot exceed the
maximum possible value of a punycode_uint, even if the supplied
\fIoutput_length\fP is greater than that.
.IP "punycode_uint [] output" 12
An array of code points like the input argument of
\fBpunycode_encode()\fP (see above).
.IP "unsigned char [] case_flags" 12
A \fBNULL\fP pointer (if the flags are not needed by the
caller) or an array of boolean values parallel to the \fIoutput\fP
array.  Nonzero (true, flagged) suggests that the corresponding
Unicode character be forced to uppercase by the caller (if
possible), and zero (false, unflagged) suggests that it be forced
to lowercase (if possible).  ASCII code points (0..7F) are output
already in the proper case, but their flags will be set
appropriately so that applying the flags would be harmless.
.SH "DESCRIPTION"
Converts Punycode to a sequence of code points (presumed to be
Unicode code points).
.SH "RETURN VALUE"
The return value can be any of the \fBPunycode_status\fP
values defined above.  If not \fBPUNYCODE_SUCCESS\fP, then
\fIoutput_length\fP, \fIoutput\fP, and \fIcase_flags\fP might contain garbage.
.SH "REPORTING BUGS"
Report bugs to <bug-libidn@gnu.org>.
.SH COPYRIGHT
Copyright \(co 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson.
.br
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
.SH "SEE ALSO"
The full documentation for
.B libidn
is maintained as a Texinfo manual.  If the
.B info
and
.B libidn
programs are properly installed at your site, the command
.IP
.B info libidn
.PP
should give you access to the complete manual.