o
    uã¤g­  ã                   @   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   úZ/var/www/html/ecg_monitoring/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
    