public class IDNA
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACE_PREFIX |
Constructor and Description |
---|
IDNA() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
toASCII(java.lang.String input)
Converts a Unicode string to ASCII using the procedure in RFC3490
section 4.1.
|
static java.lang.String |
toASCII(java.lang.String input,
boolean allowUnassigned,
boolean useSTD3ASCIIRules)
Converts a Unicode string to ASCII using the procedure in RFC3490
section 4.1.
|
static java.lang.String |
toUnicode(java.lang.String input)
Converts an ASCII-encoded string to Unicode.
|
static java.lang.String |
toUnicode(java.lang.String input,
boolean allowUnassigned,
boolean useSTD3ASCIIRules)
Converts an ASCII-encoded string to Unicode.
|
public static final java.lang.String ACE_PREFIX
public static java.lang.String toASCII(java.lang.String input) throws IDNAException
input
- Unicode string.IDNAException
public static java.lang.String toASCII(java.lang.String input, boolean allowUnassigned, boolean useSTD3ASCIIRules) throws IDNAException
input
- Unicode string.allowUnassigned
- Unassigned characters, allowed or not?useSTD3ASCIIRules
- STD3 ASCII rules, enforced or not?IDNAException
public static java.lang.String toUnicode(java.lang.String input)
input
- ASCII input string.public static java.lang.String toUnicode(java.lang.String input, boolean allowUnassigned, boolean useSTD3ASCIIRules)
input
- ASCII input string.allowUnassigned
- Allow unassigned Unicode characters.useSTD3ASCIIRules
- Check that the output conforms to STD3.