29#if U_SHOW_CPLUSPLUS_API
65#ifndef U_HIDE_DEPRECATED_API
174#if U_SHOW_CPLUSPLUS_API
227#define UIDNA_INFO_INITIALIZER { \
228 (int16_t)sizeof(UIDNAInfo), \
257 const UChar *label, int32_t length,
258 UChar *dest, int32_t capacity,
284 const UChar *label, int32_t length,
285 UChar *dest, int32_t capacity,
313 const UChar *name, int32_t length,
314 UChar *dest, int32_t capacity,
340 const UChar *name, int32_t length,
341 UChar *dest, int32_t capacity,
365 const char *label, int32_t length,
366 char *dest, int32_t capacity,
388 const char *label, int32_t length,
389 char *dest, int32_t capacity,
411 const char *name, int32_t length,
412 char *dest, int32_t capacity,
434 const char *name, int32_t length,
435 char *dest, int32_t capacity,
534#ifndef U_HIDE_DEPRECATED_API
599 UChar* dest, int32_t destCapacity,
647 UChar* dest, int32_t destCapacity,
698 UChar* dest, int32_t destCapacity,
745 UChar* dest, int32_t destCapacity,
786 const UChar *s2, int32_t length2,
"Smart pointer" class, closes a UIDNA via uidna_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
C API: Parse Error Information.
Output container for IDNA processing errors.
int16_t size
sizeof(UIDNAInfo)
int32_t reservedI3
Reserved field, do not use.
uint32_t errors
Bit set indicating IDNA processing errors.
UBool isTransitionalDifferent
Set to true if transitional and nontransitional processing produce different results.
UBool reservedB3
Reserved field, do not use.
int32_t reservedI2
Reserved field, do not use.
A UParseError struct is used to returned detailed information about parsing errors.
@ UIDNA_ERROR_CONTEXTO_DIGITS
A label does not meet the IDNA CONTEXTO requirements for digits.
@ UIDNA_ERROR_TRAILING_HYPHEN
A label ends with a hyphen-minus ('-').
@ UIDNA_ERROR_LEADING_COMBINING_MARK
A label starts with a combining mark.
@ UIDNA_ERROR_LABEL_TOO_LONG
A domain name label is longer than 63 bytes.
@ UIDNA_ERROR_CONTEXTJ
A label does not meet the IDNA CONTEXTJ requirements.
@ UIDNA_ERROR_DISALLOWED
A label or domain name contains disallowed characters.
@ UIDNA_ERROR_LABEL_HAS_DOT
A label contains a dot=full stop.
@ UIDNA_ERROR_BIDI
A label does not meet the IDNA BiDi requirements (for right-to-left characters).
@ UIDNA_ERROR_HYPHEN_3_4
A label contains hyphen-minus ('-') in the third and fourth positions.
@ UIDNA_ERROR_PUNYCODE
A label starts with "xn--" but does not contain valid Punycode.
@ UIDNA_ERROR_DOMAIN_NAME_TOO_LONG
A domain name is longer than 255 bytes in its storage form.
@ UIDNA_ERROR_LEADING_HYPHEN
A label starts with a hyphen-minus ('-').
@ UIDNA_ERROR_CONTEXTO_PUNCTUATION
A label does not meet the IDNA CONTEXTO requirements for punctuation characters.
@ UIDNA_ERROR_EMPTY_LABEL
A non-final domain name label (or the whole domain name) is empty.
@ UIDNA_ERROR_INVALID_ACE_LABEL
An ACE label does not contain a valid label string.
struct UIDNA UIDNA
C typedef for struct UIDNA.
int32_t uidna_IDNToASCII(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
IDNA2003: Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC.
@ UIDNA_CHECK_CONTEXTJ
IDNA option to check for whether the input conforms to the CONTEXTJ rules.
@ UIDNA_NONTRANSITIONAL_TO_ASCII
IDNA option for nontransitional processing in ToASCII().
@ UIDNA_ALLOW_UNASSIGNED
Option to allow unassigned code points in domain names and labels.
@ UIDNA_CHECK_CONTEXTO
IDNA option to check for whether the input conforms to the CONTEXTO rules.
@ UIDNA_CHECK_BIDI
IDNA option to check for whether the input conforms to the BiDi rules.
@ UIDNA_USE_STD3_RULES
Option to check whether the input conforms to the STD3 ASCII rules, for example the restriction of la...
@ UIDNA_DEFAULT
Default options value: UTS #46 nontransitional processing.
@ UIDNA_NONTRANSITIONAL_TO_UNICODE
IDNA option for nontransitional processing in ToUnicode().
U_CAPI void uidna_close(UIDNA *idna)
Closes a UIDNA instance.
U_CAPI int32_t uidna_nameToUnicode(const UIDNA *idna, const UChar *name, int32_t length, UChar *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a whole domain name into its Unicode form for human-readable display.
int32_t uidna_compare(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, int32_t options, UErrorCode *status)
IDNA2003: Compare two IDN strings for equivalence.
U_CAPI int32_t uidna_labelToASCII(const UIDNA *idna, const UChar *label, int32_t length, UChar *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a single domain name label into its ASCII form for DNS lookup.
U_CAPI int32_t uidna_nameToASCII_UTF8(const UIDNA *idna, const char *name, int32_t length, char *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a whole domain name into its ASCII form for DNS lookup.
int32_t uidna_toASCII(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
IDNA2003: This function implements the ToASCII operation as defined in the IDNA RFC.
U_CAPI int32_t uidna_nameToASCII(const UIDNA *idna, const UChar *name, int32_t length, UChar *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a whole domain name into its ASCII form for DNS lookup.
U_CAPI int32_t uidna_labelToUnicodeUTF8(const UIDNA *idna, const char *label, int32_t length, char *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a single domain name label into its Unicode form for human-readable display.
int32_t uidna_IDNToUnicode(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC.
U_CAPI int32_t uidna_labelToASCII_UTF8(const UIDNA *idna, const char *label, int32_t length, char *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a single domain name label into its ASCII form for DNS lookup.
U_CAPI int32_t uidna_labelToUnicode(const UIDNA *idna, const UChar *label, int32_t length, UChar *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a single domain name label into its Unicode form for human-readable display.
U_CAPI UIDNA * uidna_openUTS46(uint32_t options, UErrorCode *pErrorCode)
Returns a UIDNA instance which implements UTS #46.
U_CAPI int32_t uidna_nameToUnicodeUTF8(const UIDNA *idna, const char *name, int32_t length, char *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode)
Converts a whole domain name into its Unicode form for human-readable display.
int32_t uidna_toUnicode(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
IDNA2003: This function implements the ToUnicode operation as defined in the IDNA RFC.
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API
int8_t UBool
The ICU boolean type, a signed-byte integer.
#define U_CAPI
This is used to declare a function as a public ICU C API.
char16_t UChar
The base type for UTF-16 code units and pointers.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.