object Idna
source · line 22public object Idna
UTS #46 nontransitional domain-name conversion with STD3, hyphen, ContextJ, bidirectional, and DNS length checks. Symbols and ContextO follow UTS #46; strict IDNA2008 exclusions are not added. Label operations accept one label.
function toAscii
source · line 43public fun toAscii(domain: String): String
Validates and converts a complete domain name to its ASCII representation. Invalid input throws IdnaException.
parameter domain
source · line 43domain: String
function toUnicode
source · line 48public fun toUnicode(domain: String): String
Validates and converts a complete domain name to its Unicode representation. Invalid input throws IdnaException.
parameter domain
source · line 48domain: String
property unicodeVersion
source · line 30public val unicodeVersion: String
get: public read-only
The Unicode data version used by the supported IDNA profile.
getter get
source · line 30get(): String
property backendVersion
source · line 26public val backendVersion: String
get: public read-only
The version reported by the linked IDNA backend.
getter get
source · line 26get(): String
function toAsciiOrNone
source · line 62public fun toAsciiOrNone(domain: String): String?
Returns the ASCII name, or None for an IDNA input-validation failure. Backend failures still throw IdnaException.
parameter domain
source · line 62domain: String
function labelToAscii
source · line 52public fun labelToAscii(label: String): String
Validates and converts one label to ASCII; input containing a domain separator is rejected.
parameter label
source · line 52label: String
function labelToUnicode
source · line 57public fun labelToUnicode(label: String): String
Validates and converts one label to Unicode; input containing a domain separator is rejected.
parameter label
source · line 57label: String
function parse
source · line 37public fun parse(domain: String): IdnaName
Validates a domain name and returns both its ASCII and Unicode representations.
parameter domain
source · line 37domain: String
function toUnicodeOrNone
source · line 67public fun toUnicodeOrNone(domain: String): String?
Returns the Unicode name, or None for an IDNA input-validation failure. Backend failures still throw IdnaException.
parameter domain
source · line 67domain: String