%PDF- %PDF-
Direktori : /lib/python3/dist-packages/httplib2/__pycache__/ |
Current File : //lib/python3/dist-packages/httplib2/__pycache__/iri2uri.cpython-312.pyc |
� Zճc9 � � � d Z dZdZg ZdZdZddlZg d�Zd� Z d � Z ed k( r+ddlZ G d� dej � Z ej � yy) zConverts an IRI to a URI.z!Joe Gregorio (joe@bitworking.org)zCopyright 2006, Joe Gregorioz1.0.0�MIT� 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 �� � | }t | � }t D ]L \ }}||k r |S ||k\ s�||k s�dj | j d� D �cg c] }d|z �� c}� } |S |S c c}w )N� �utf-8z%%%2X)�ord�escape_range�join�encode)�c�retval�i�low�high�os �2/usr/lib/python3/dist-packages/httplib2/iri2uri.pyr r 0 s~ � � �F��A��A�!� � ��T��s�7�� �M� ��8��T� ��W�W�1�8�8�G�3D�E�a�g��k�E�F�F���M� � �M�� Fs �A% c �R � t | t � r�t j j | � \ }}}}}|j d� j d� }t j j |||||f� } dj | D �cg c] }t |� �� c}� } | S c c}w )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.�idnar r ) � isinstance�str�urllib�parse�urlsplitr �decode� urlunsplitr )�uri�scheme� authority�path�query�fragmentr s r �iri2urir"