� ��abc@s�ddlZddlZddlZejdfejdfejdfejdfejdfejdfej dfgZ ej d �Z d �Z dS( i����Ntutf8tutf16sutf16-besutf16-letutf32sutf32-besutf32-lescoding[:=]\s*([-\w.]+)cCs�x:tD]2\}}|j|�r|t|�j|�SqWxl|jd�d D]W}|dd!dkrQtj|�rQtj|�j�djd�}|j|�SqQW|jtj t ��S(s�Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3s iiit#tascii( tBOMSt startswithtlentdecodetsplitt ENCODING_REtsearchtgroupstlocaletgetpreferredencodingtFalse(tdatatbomtencodingtline((s6/usr/lib/python2.7/site-packages/pip/utils/encoding.pyt auto_decodes""(tcodecsR tretBOM_UTF8t BOM_UTF16t BOM_UTF16_BEt BOM_UTF16_LEt BOM_UTF32t BOM_UTF32_BEt BOM_UTF32_LERtcompileR R(((s6/usr/lib/python2.7/site-packages/pip/utils/encoding.pyts