| GNU Libidn API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define IDNAPI enum Punycode_status; const char * punycode_strerror (Punycode_status rc); typedef punycode_uint; int punycode_encode (size_t input_length,const punycode_uint input[],unsigned char case_flags[],size_t *output_length,char output[]); int punycode_decode (size_t input_length,const char input[],size_t *output_length,punycode_uint output[],unsigned char case_flags[]);
typedef enum
{
PUNYCODE_SUCCESS = punycode_success,
PUNYCODE_BAD_INPUT = punycode_bad_input,
PUNYCODE_BIG_OUTPUT = punycode_big_output,
PUNYCODE_OVERFLOW = punycode_overflow
} Punycode_status;
Enumerated return codes of punycode_encode() and punycode_decode().
The value 0 is guaranteed to always correspond to success.
| Successful operation. This value is guaranteed to always be zero, the remaining ones are only guaranteed to hold non-zero values, for logical comparison purposes. | |
| Input is invalid. | |
| Output would exceed the space provided. | |
| Input needs wider integers to process. |
typedef uint32_t punycode_uint;
Unicode code point data type, this is always a 32 bit unsigned integer.
int punycode_encode (size_t input_length,const punycode_uint input[],unsigned char case_flags[],size_t *output_length,char output[]);
|
|
|
|
|
|
|
|
|
|
Returns : |
int punycode_decode (size_t input_length,const char input[],size_t *output_length,punycode_uint output[],unsigned char case_flags[]);
|
|
|
|
|
|
|
|
|
|
Returns : |