punycoder library

A pure Dart implementation of Punycode (RFC 3492) with support for mixed-case annotation and errata.

Classes

PunycodeCodec
A Codec that converts Unicode strings to Punycode ASCII strings.
PunycodeDecoder
Punycode decoder as defined in RFC 3492 Section 6.2.
PunycodeEncoder
Punycode encoder as defined in RFC 3492 Section 6.3.

Constants

punycode → const PunycodeCodec
The default instance of PunycodeCodec.

Functions

domainToAscii(String domain, {bool validate = true}) → String
Converts a domain name to its Punycode-encoded ASCII representation.
domainToUnicode(String domain) → String
Converts a domain name from Punycode-encoded ASCII to Unicode.
emailToAscii(String email, {bool validate = true}) → String
Converts the domain part of an email address to Punycode-encoded ASCII.
emailToUnicode(String email) → String
Converts the domain part of an email address from Punycode-encoded ASCII to Unicode.