···7474 to Punycode (ASCII-compatible encoding) before lookup, following the IDNA2008
7575 protocol defined in {{:https://datatracker.ietf.org/doc/html/rfc5890}RFC 5890}
7676 (IDNA Definitions) and {{:https://datatracker.ietf.org/doc/html/rfc5891}RFC 5891}
7777- (IDNA Protocol).
7777+ (IDNA Protocol). The conversion is performed using [Punycode_idna.to_ascii].
78787979 Punycode encoding, specified in {{:https://datatracker.ietf.org/doc/html/rfc3492}RFC 3492},
8080 uniquely and reversibly transforms Unicode strings into ASCII-compatible
8181- strings using the "xn--" prefix (ACE prefix). Both Unicode and Punycode
8282- input are accepted:
8181+ strings using the "xn--" prefix (ACE prefix). See the [Punycode] library for
8282+ the core encoding implementation. Both Unicode and Punycode input are accepted:
83838484 {[
8585 Publicsuffix.registrable_domain psl "www.食狮.com.cn"
···113113 {- {{:https://datatracker.ietf.org/doc/html/rfc3492}RFC 3492} - Punycode: A Bootstring encoding of Unicode for IDNA}
114114 {- {{:https://datatracker.ietf.org/doc/html/rfc5890}RFC 5890} - Internationalized Domain Names for Applications (IDNA): Definitions}
115115 {- {{:https://datatracker.ietf.org/doc/html/rfc5891}RFC 5891} - Internationalized Domain Names in Applications (IDNA): Protocol}}
116116+117117+ {1 Related Libraries}
118118+119119+ {ul
120120+ {- [Punycode] - Core Punycode encoding/decoding implementation}
121121+ {- [Punycode_idna] - IDNA ToASCII/ToUnicode operations used for IDN conversion}}
116122*)
117123118124(** {1 Types} *)
···141147 domain names should not have leading dots. *)
142148 | Punycode_error of string
143149 (** Failed to convert internationalized domain to Punycode encoding.
150150+ The string contains the error message from [Punycode_idna].
144151 See {{:https://datatracker.ietf.org/doc/html/rfc3492}RFC 3492}
145152 for Punycode encoding requirements and
146153 {{:https://datatracker.ietf.org/doc/html/rfc5891}RFC 5891}