.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "punycode_encode" 3 "0.6.14" "libidn" "libidn" .SH NAME punycode_encode \- encode Unicode to Punycode .SH SYNOPSIS .B #include <punycode.h> .sp .BI "int punycode_encode(size_t " input_length ", const punycode_uint [] " input ", const unsigned char [] " case_flags ", size_t * " output_length ", char [] " output ");" .SH ARGUMENTS .IP "size_t input_length" 12 The number of code points in the \fIinput\fP array and the number of flags in the \fIcase_flags\fP array. .IP "const punycode_uint [] input" 12 An array of code points. They are presumed to be Unicode code points, but that is not strictly REQUIRED. The array contains code points, not code units. UTF-16 uses code units D800 through DFFF to refer to code points 10000..10FFFF. The code points D800..DFFF do not occur in any valid Unicode string. The code points that can occur in Unicode strings (0..D7FF and E000..10FFFF) are also called Unicode scalar values. .IP "const unsigned char [] case_flags" 12 A \fBNULL\fP pointer or an array of boolean values parallel to the \fIinput\fP array. Nonzero (true, flagged) suggests that the corresponding Unicode character be forced to uppercase after being decoded (if possible), and zero (false, unflagged) suggests that it be forced to lowercase (if possible). ASCII code points (0..7F) are encoded literally, except that ASCII letters are forced to uppercase or lowercase according to the corresponding case flags. If \fIcase_flags\fP is a \fBNULL\fP pointer then ASCII letters are left as they are, and other code points are treated as unflagged. .IP "size_t * output_length" 12 The caller passes in the maximum number of ASCII code points that it can receive. On successful return it will contain the number of ASCII code points actually output. .IP "char [] output" 12 An array of ASCII code points. It is *not* null-terminated; it will contain zeros if and only if the \fIinput\fP contains zeros. (Of course the caller can leave room for a terminator and add one if needed.) .SH "DESCRIPTION" Converts a sequence of code points (presumed to be Unicode code points) to Punycode. .SH "RETURN VALUE" The return value can be any of the \fBPunycode_status\fP values defined above except \fBPUNYCODE_BAD_INPUT\fP. If not \fBPUNYCODE_SUCCESS\fP, then \fIoutput_size\fP and \fIoutput\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.