|  |  |  | GNU Libidn API Reference Manual |  | 
|---|---|---|---|---|
  typedef enum
  {
    IDNA_SUCCESS = 0,
    IDNA_STRINGPREP_ERROR = 1,
    IDNA_PUNYCODE_ERROR = 2,
    IDNA_CONTAINS_NON_LDH = 3,
    /* Workaround typo in earlier versions. */
    IDNA_CONTAINS_LDH = IDNA_CONTAINS_NON_LDH,
    IDNA_CONTAINS_MINUS = 4,
    IDNA_INVALID_LENGTH = 5,
    IDNA_NO_ACE_PREFIX = 6,
    IDNA_ROUNDTRIP_VERIFY_ERROR = 7,
    IDNA_CONTAINS_ACE_PREFIX = 8,
    IDNA_ICONV_ERROR = 9,
    /* Internal errors. */
    IDNA_MALLOC_ERROR = 201,
    IDNA_DLOPEN_ERROR = 202
  } Idna_rc;
Enumerated return codes of idna_to_ascii_4i(),
idna_to_unicode_44i() functions (and functions derived from those
functions).  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. | |
| Error during string preparation. | |
| Error during punycode operation. | |
| For IDNA_USE_STD3_ASCII_RULES, indicate that the string contains non-LDH ASCII characters. | |
| For IDNA_USE_STD3_ASCII_RULES, indicate that the string contains a leading or trailing hyphen-minus (U+002D). | |
| The final output string is not within the (inclusive) range 1 to 63 characters. | |
| The string does not contain the ACE prefix (for ToUnicode). | |
| The ToASCII operation on output string does not equal the input. | |
| The input contains the ACE prefix (for ToASCII). | |
| Could not convert string in locale encoding. | |
| Could not allocate buffer (this is typically a fatal error). | |
| Could not dlopen the libcidn DSO (only used internally in libc). | 
  typedef enum
  {
    IDNA_ALLOW_UNASSIGNED = 0x0001,
    IDNA_USE_STD3_ASCII_RULES = 0x0002
  } Idna_flags;
Flags to pass to idna_to_ascii_4i(), idna_to_unicode_44i() etc.