idna

Function domain_to_unicode

source
pub fn domain_to_unicode(domain: &str) -> (String, Result<(), Errors>)
Expand description

The domain to Unicode algorithm.

Return the Unicode representation of a domain name, normalizing characters (upper-case to lower-case and other kinds of equivalence) and decoding Punycode as necessary.

This may indicate syntax violations but always returns a string for the mapped domain.