URI.normalizeIDNA
Normalize the URI applying RFC 3986 normalization and IDNA ToASCII for hostnames.
Returns a new URI where the host (when present and not an IP-literal) is converted to ASCII using idnaToASCII in addition to the standard normalize() processing.
Returns
A normalized copy of this URI with the host converted to ASCII when applicable.
Throws
Exception if IDNA conversion fails (e.g., label/domain length constraints).Normalize the URI applying RFC 3986 normalization and IDNA ToASCII for hostnames using options.
This overload behaves like normalizeIDNA() but allows callers to opt into stricter IDNA label validation via UriOptions.idnaStrict.
Parameters
opt | Normalization options controlling IDNA strictness. |
Returns
A normalized copy of this URI with the host converted to ASCII when applicable.
Throws
Exception if IDNA conversion fails.