Y@sddlZddlZddlZejdfejdfejdfejdfejdfejdfej dfgZ ej d Z d d Z dS) Nutf8utf16zutf16-bezutf16-leutf32zutf32-bezutf32-lescoding[:=]\s*([-\w.]+)cCsx@tD]8\}}|j|r|t|dj|SqWxu|jdddD]Z}|dddkr]tj|r]tj|jdjd}|j|Sq]W|jtj dS) zCheck a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3Ns r#asciiF) BOMS startswithlendecodesplit ENCODING_REsearchgroupslocalegetpreferredencoding)databomencodingliner1/tmp/pip-build-3puug3g5/pip/pip/utils/encoding.py auto_decodes! %"r)codecsrreBOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LEr compilerrrrrrs