File: //opt/python38/lib/python3.8/site-packages/setuptools/__pycache__/unicode_utils.cpython-38.pyc
U
�i�_� � @ s8 d dl Z d dlZd dlmZ dd� Zdd� Zdd� ZdS ) � N)�sixc C sV t | tj�rt�d| �S z$| �d�} t�d| �} | �d�} W n tk
rP Y nX | S )NZNFD�utf-8)�
isinstancer � text_type�unicodedata� normalize�decode�encode�UnicodeError)�path� r �</tmp/pip-unpacked-wheel-tlqm5ymo/setuptools/unicode_utils.py� decompose s
r c C s\ t | tj�r| S t�� pd}|df}|D ].}z| �|�W S tk
rT Y q(Y q(X q(dS )zY
Ensure that the given path is decoded,
NONE when no expected encoding works
r N)r r r �sys�getfilesystemencodingr �UnicodeDecodeError)r Zfs_enc�
candidates�encr r r
�filesys_decode s r c C s( z| � |�W S tk
r" Y dS X dS )z/turn unicode encoding into a functional routineN)r �UnicodeEncodeError)�stringr r r r
�
try_encode'