Pike v8.0 release 1738

Method Protocols.HTTP.iri_encode()


Method iri_encode

string iri_encode(string s)

Description

Encodes the given string using %XX encoding to be used as a component part in an IRI (Internationalized Resource Identifier, see RFC 3987). This means that all chars outside the IRI iunreserved set are encoded, i.e. this function encodes equivalently to uri_encode except that all 8-bit and wider characters are left as-is.

Bugs

This function currently does not encode chars in the Unicode private ranges, although that is strictly speaking required in some but not all IRI components. That could change if it turns out to be a problem.

See also

percent_decode, uri_encode