_d&ddlZddlZdZdZdZy)Nct|trtjd|S |j d}tjd|}|j d}|S#t $rY|SwxYw)NNFDutf-8) isinstancestr unicodedata normalizedecodeencode UnicodeError)paths :/usr/lib/python3/dist-packages/setuptools/unicode_utils.py decomposersr$$$UD11 {{7#$$UD1{{7# K   K s8A"" A/.A/ct|tr|Stjxsd}|df}|D]} |j |cSy#t $rY$wxYw)zY Ensure that the given path is decoded, NONE when no expected encoding works rN)rrsysgetfilesystemencodingr UnicodeDecodeError)r fs_enc candidatesencs rfilesys_decodersf $  & & ( 3GFJ ;;s# #"   sA  AAcD |j|S#t$rYywxYw)z/turn unicode encoding into a functional routineN)r UnicodeEncodeError)stringrs r try_encoder%s(}}S!! s  )rrrrrrrs  &r