1punycode_decode(3)                  libidn                  punycode_decode(3)
2
3
4

NAME

6       punycode_decode - API function
7

SYNOPSIS

9       #include <punycode.h>
10
11       int  punycode_decode(size_t input_length, const char [] input, size_t *
12       output_length, punycode_uint [] output, unsigned char [] case_flags);
13

ARGUMENTS

15       size_t input_length
16                   The number of ASCII code points in the input array.
17
18       const char [] input
19                   An array of ASCII code points (0..7F).
20
21       size_t * output_length
22                   The caller passes in the maximum number of code points that
23                   it  can  receive  into  the output array (which is also the
24                   maximum number of  flags  that  it  can  receive  into  the
25                   case_flags array, if case_flags is not a NULL pointer).  On
26                   successful return it will contain the number of code points
27                   actually output (which is also the number of flags actually
28                   output, if case_flags is not a null pointer).  The  decoder
29                   will  never need to output more code points than the number
30                   of ASCII code points in the input, because of the  way  the
31                   encoding is defined.  The number of code points output can‐
32                   not exceed the maximum possible value of  a  punycode_uint,
33                   even if the supplied output_length is greater than that.
34
35       punycode_uint [] output
36                   An  array  of  code points like the input argument of puny‐
37                   code_encode() (see above).
38
39       unsigned char [] case_flags
40                   A NULL pointer (if the flags are not needed by the  caller)
41                   or an array of boolean values parallel to the output array.
42                   Nonzero (true, flagged)  suggests  that  the  corresponding
43                   Unicode  character be forced to uppercase by the caller (if
44                   possible), and zero (false, unflagged) suggests that it  be
45                   forced  to  lowercase  (if  possible).   ASCII  code points
46                   (0..7F) are output already in the proper  case,  but  their
47                   flags  will be set appropriately so that applying the flags
48                   would be harmless.
49

DESCRIPTION

51       Converts Punycode to a sequence of code points (presumed to be  Unicode
52       code points).
53

RETURN VALUE

55       The  return  value  can  be  any  of the Punycode_status values defined
56       above.   If  not  PUNYCODE_SUCCESS,  then  output_length,  output,  and
57       case_flags might contain garbage.
58

REPORTING BUGS

60       Report   bugs   to   <bug-libidn@gnu.org>.    GNU   Libidn  home  page:
61       http://www.gnu.org/software/libidn/ General help  using  GNU  software:
62       http://www.gnu.org/gethelp/
63
65       Copyright © 2002-2013 Simon Josefsson.
66       Copying  and  distribution  of this file, with or without modification,
67       are permitted in any medium  without  royalty  provided  the  copyright
68       notice and this notice are preserved.
69

SEE ALSO

71       The  full  documentation  for libidn is maintained as a Texinfo manual.
72       If the info and libidn programs are properly installed  at  your  site,
73       the command
74
75              info libidn
76
77       should give you access to the complete manual.
78
79
80
81libidn                               1.28                   punycode_decode(3)
Impressum