Dashboard
PHP:
8.1.34
OS:
Linux
User:
uid288609
/
/
usr
/
lib
/
python3
/
dist-packages
/
httplib2
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: iri2uri.cpython-39.pyc
a }��^9 � @ sf d Z dZdZg ZdZdZddlZg d�Zdd � Z d d� Z edkrbddlZG d d� dej �Ze�� dS )zConverts an IRI to a URI.z!Joe Gregorio (joe@bitworking.org)zCopyright 2006, Joe Gregorioz1.0.0ZMIT� N))� i�� )i � i�� )i � i� )i� i� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� )i i�� c C sX | }t | �}tD ]B\}}||k r$ qT||kr||krd�dd� | �d�D ��} qTq|S )N� c S s g | ]}d | �qS )z%%%2X� )�.0�or r �2/usr/lib/python3/dist-packages/httplib2/iri2uri.py� <listcomp>7 � zencode.<locals>.<listcomp>�utf-8)�ord�escape_range�join�encode)�cZretval�iZlowZhighr r r r 0 s r c C s^ t | t�rZtj�| �\}}}}}|�d��d�}tj�|||||f�} d�dd� | D ��} | S )z�Convert an IRI to a URI. Note that IRIs must be passed in a unicode strings. That is, do not utf-8 encode the IRI before passing it into the function.Zidnar r c S s g | ]}t |��qS r )r )r r r r r r G r ziri2uri.<locals>.<listcomp>) � isinstance�str�urllib�parseZurlsplitr �decodeZ urlunsplitr )�uriZschemeZ authority�pathZqueryZfragmentr r r �iri2uri<