Function idna::domain_to_unicode

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

The domain to Unicode algorithm; version returning String and no ASCII deny list (i.e. UseSTD3ASCIIRules=false).

This function exists for backward-compatibility. Consider using Uts46::to_user_interface or Uts46::to_unicode.

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.

If the second item of the tuple indicates an error, the first item of the tuple denotes errors using the REPLACEMENT CHARACTERs in order to be able to illustrate errors to the user. When the second item of the return tuple signals an error, the first item of the tuple must not be used in a network protocol.