utils.encoding.iri_to_uri()

iri_to_uri(iri) [source]

Convert an Internationalized Resource Identifier (IRI) portion to a URI portion that is suitable for inclusion in a URL.

This is the algorithm from section 3.1 of RFC 3987#section-3.1. However, since we are assuming input is either UTF-8 or unicode already, we can simplify things a little from the full method.

Takes an IRI in UTF-8 bytes and returns ASCII bytes containing the encoded result.

doc_Django
2016-10-09 18:40:24
Comments
Leave a Comment

Please login to continue.