U
Re @ s, d dl Z d dlZdd Zdd Zdd ZdS ) Nc C sT t | trtd| S z$| d} td| } | d} W n tk
rN Y nX | S )NZNFDutf-8)
isinstancestrunicodedata normalizedecodeencodeUnicodeError)path r /builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el7.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/unicode_utils.py decompose s
r
c C sZ t | tr| S t pd}|df}|D ].}z| |W S tk
rR 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 sysgetfilesystemencodingr UnicodeDecodeError)r
Zfs_enc
candidatesencr 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% s r )r r r
r r r r r r <module> s