o ƒ_¶a­ã@s,ddlZddlZdd„Zdd„Zdd„ZdS)éNcCsRt|tƒr t d|¡Sz| d¡}t d|¡}| d¡}W|Sty(Y|Sw)NÚNFDúutf-8)Ú isinstanceÚstrÚ unicodedataÚ normalizeÚdecodeÚencodeÚ UnicodeError)Úpath©r ú:/usr/lib/python3/dist-packages/setuptools/unicode_utils.pyÚ decomposes      þþrc CsRt|tƒr|St ¡p d}|df}|D]}z| |¡WSty&YqwdS)zY Ensure that the given path is decoded, NONE when no expected encoding works rN)rrÚsysÚgetfilesystemencodingrÚUnicodeDecodeError)r Úfs_encÚ candidatesÚencr r r Úfilesys_decodes   ÿýrcCs"z| |¡WStyYdSw)z/turn unicode encoding into a functional routineN)r ÚUnicodeEncodeError)Ústringrr r r Ú try_encode%s   ÿr)rrrrrr r r r Ús