The IDNA class is not intended for public subclassing.
The non-static methods implement UTS #46 and IDNA2008. IDNA2008 is implemented according to UTS #46, see getUTS46Instance().
IDNA2003 is obsolete. The static methods implement IDNA2003. They are all deprecated.
IDNA2003 API Overview:
The static IDNA API methods implement the IDNA protocol as defined in the IDNA RFC. The draft defines 2 operations: ToASCII and ToUnicode. Domain labels containing non-ASCII code points are required to be processed by ToASCII operation before passing it to resolver libraries. Domain names that are obtained from resolver libraries are required to be processed by ToUnicode operation before displaying the domain name to the user. IDNA requires that implementations process input strings with Nameprep, which is a profile of Stringprep , and then with Punycode. Implementations of IDNA MUST fully implement Nameprep and Punycode; neither Nameprep nor Punycode are optional. The input and output of ToASCII and ToUnicode operations are Unicode and are designed to be chainable, i.e., applying ToASCII or ToUnicode operations multiple times to an input string will yield the same result as applying the operation once. ToUnicode(ToUnicode(ToUnicode...(ToUnicode(string)))) == ToUnicode(string) ToASCII(ToASCII(ToASCII...(ToASCII(string))) == ToASCII(string).
| Modifier and Type | Class and Description |
|---|---|
| public static enum | IDNA.Error
IDNA error bit set values. |
| public static class | IDNA.Info
Output container for IDNA processing errors. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALLOW_UNASSIGNED
Option to allow unassigned code points in domain names and labels. |
| public static final int | CHECK_BIDI
IDNA option to check for whether the input conforms to the BiDi rules. |
| public static final int | CHECK_CONTEXTJ
IDNA option to check for whether the input conforms to the CONTEXTJ rules. |
| public static final int | CHECK_CONTEXTO
IDNA option to check for whether the input conforms to the CONTEXTO rules. |
| public static final int | DEFAULT
Default options value: None of the other options are set. |
| public static final int | NONTRANSITIONAL_TO_ASCII
IDNA option for nontransitional processing in ToASCII(). |
| public static final int | NONTRANSITIONAL_TO_UNICODE
IDNA option for nontransitional processing in ToUnicode(). |
| public static final int | USE_STD3_RULES
Option to check whether the input conforms to the STD3 ASCII rules, for example the restriction of labels to LDH characters (ASCII Letters, Digits and Hyphen-Minus). |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static void | |
| protected static void | |
| public static int | Returns: 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2First IDN string as StringBuffer s1, StringBuffer Second IDN string as StringBuffer s2, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Compare two IDN strings for equivalence.
getUTS46Instance(int).
|
| public static int | Returns: 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2First IDN string s1, String Second IDN string s2, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Compare two IDN strings for equivalence.
getUTS46Instance(int).
|
| public static int | Returns: 0 if the strings are equal, > 0 if i1 > i2 and < 0 if i1 < i2First IDN string as UCharacterIterator s1, UCharacterIterator Second IDN string as UCharacterIterator s2, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Compare two IDN strings for equivalence.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as UCharacterIterator to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as a StringBuffer to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as UCharacterIterator to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as StringBuffer to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
StringPrepParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: This function implements the ToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as StringBuffer to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: This function implements the ToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as UCharacterIterator to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: This function implements the ToASCII operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: This function implements the ToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as StringBuffer to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: This function implements the ToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static StringBuffer | Returns: StringBuffer the converted StringThe input string as UCharacterIterator to be processed src, int A bit set of options:
- IDNA.DEFAULT Use default options, i.e., do not process unassigned code points
and do not use STD3 ASCII rules
If unassigned code points are found the operation fails with
ParseException.
- IDNA.ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations
If this option is set, the unassigned code points are in the input
are treated as normal Unicode code points.
- IDNA.USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions
If this option is set and the input does not satisfy STD3 rules,
the operation will fail with ParseException options)
Deprecated
ICU 55 Use UTS 46 instead via
IDNA2003: Function that implements the ToUnicode operation as defined in the IDNA RFC.
getUTS46Instance(int).
|
| public static IDNA | Returns: the UTS #46 IDNA instance, if successfulBit set to modify the processing and error checking. options)Returns an IDNA instance which implements UTS #46. |
| protected static boolean | |
| protected static boolean | |
| protected static boolean | |
| protected static boolean | |
| public abstract StringBuilder | Returns: destInput domain name label label, StringBuilder Destination string object dest, IDNA.Output container of IDNA processing details. infoConverts a single domain name label into its ASCII form for DNS lookup. |
| public abstract StringBuilder | Returns: destInput domain name label label, StringBuilder Destination string object dest, IDNA.Output container of IDNA processing details. infoConverts a single domain name label into its Unicode form for human-readable display. |
| public abstract StringBuilder | Returns: destInput domain name name, StringBuilder Destination string object dest, IDNA.Output container of IDNA processing details. infoConverts a whole domain name into its ASCII form for DNS lookup. |
| public abstract StringBuilder | Returns: destInput domain name name, StringBuilder Destination string object dest, IDNA.Output container of IDNA processing details. infoConverts a whole domain name into its Unicode form for human-readable display. |
| protected static void | |
| protected static void | |
| protected static void | |
| protected static void | |
| protected static void |