o
    h                     @   s,   d dl Z d dlZdd Zdd Zdd ZdS )    Nc                 C   sR   t | trtd| S z| d} td| } | d} W | S  ty(   Y | S w )NNFDutf-8)
isinstancestrunicodedata	normalizedecodeencodeUnicodeError)path r   K/var/www/html/venv/lib/python3.10/site-packages/setuptools/unicode_utils.py	decompose   s   

r   c              	   C   sR   t | tr| S t pd}|df}|D ]}z| |W   S  ty&   Y qw dS )zY
    Ensure that the given path is decoded,
    NONE when no expected encoding works
    r   N)r   r   sysgetfilesystemencodingr   UnicodeDecodeError)r   fs_enc
candidatesencr   r   r   filesys_decode   s   
r   c                 C   s"   z|  |W S  ty   Y dS w )z/turn unicode encoding into a functional routineN)r	   UnicodeEncodeError)stringr   r   r   r   
try_encode%   s
   r   )r   r   r   r   r   r   r   r   r   <module>   s
    