MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


libidn                                         punycodeencode(3)



NAME
     punycodeencode - encode Unicode to Punycode

SYNOPSIS
     #include 

     int punycodeencode(sizet inputlength, const punycodeuint
     [] input, const unsigned char [] caseflags

ARGUMENTS
     sizet inputlength
                 The number of code points in the input array and
                 the number of flags in the caseflags array.

     const punycodeuint [] input
                 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
                 DF to refer to code points 10000..10F.  The
                 code points D800..DF do not occur in any valid
                 Unicode string.  The code points that can  occur
                 in  Unicode  strings  (0..D7F and E000..10F)
                 are also called Unicode scalar values.

     const unsigned char [] caseflags
                 A NUL pointer or an  array  of  boolean  values
                 parallel  to  the  input  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 lower-
                 case (if possible).  ASCI code  points  (0..7F)
                 are encoded literally, except that ASCI letters
                 are forced to uppercase or  lowercase  according
                 to  the corresponding case flags.  If caseflags
                 is a NUL pointer then ASCI letters are left as
                 they  are,  and other code points are treated as
                 unflagged.

     sizet * outputlength
                 The caller passes in the maximum number of ASCI
                 code  points that it can receive.  On successful
                 return it will contain the number of ASCI  code
                 points actually output.

     char [] output
                 An array of ASCI  code  points.   It  is  *not*
                 null-terminated;  it  will  contain zeros if and
                 only if the input contains  zeros.   (Of  course
                 the  caller  can leave room for a terminator and
                 add one if needed.)



libidn                  Last change: 1.9                        1






libidn                                         punycodeencode(3)



DESCRIPTION
     Converts a sequence of code points (presumed to  be  Unicode
     code points) to Punycode.

RETURN VALUE
     The return value can be any of  the  Punycodestatus  values
     defined    above    except   PUNYCODEBADINPUT.    If   not
     PUNYCODESUCES, then outputsize and output might  contain
     garbage.

REPORTING BUGS
     Report bugs to .

COPYRIGHT
     Copyright O 2002, 2003, 2004, 2005, 2006, 2007,  2008  Simon
     Josefsson.
     Permission is granted to make and distribute verbatim copies
     of  this  manual provided the copyright notice and this per-
     mission notice are preserved on all copies.

SEE ALSO
     The full documentation for libidn is maintained as a Texinfo
     manual.   If  the  info  and  libidn  programs  are properly
     installed at your site, the command

          info libidn

     should give you access to the complete manual.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWlibidn     
    
     Interface Stability  Uncommitted    
    

NOTES
     Source for LibIDN is available on http:/opensolaris.org.












libidn                  Last change: 1.9                        2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™