IRItoURI
IRItoURI refers to the process of converting an Internationalized Resource Identifier (IRI) into a Uniform Resource Identifier (URI). IRIs extend URIs to allow non‑ASCII characters, while URIs are restricted to the US-ASCII character set. The translation is defined by standards that govern how non‑ASCII characters should be represented in a URI form, preserving the original resource while making it usable in systems that require ASCII.
The typical mapping involves two steps. First, the host component of the IRI is converted to ASCII
This conversion enables IRIs to be used in environments and protocols that expect URIs, such as certain
Example: an IRI such as http://例子.测试/路径?查询=测试 would be converted to a URI like http://xn--fsq.xn--0zwm56d/%E8%B7%AF%E5%BE%84?%E6%9F%A5%E8%AF%95=%E6%B5%8B%E8%AF%95. See also