3 ÝPfËã@sjddlZddlZddlZejdfejdfejdfejdfejdfejdfej dfgZ ej d ƒZ d d „Z dS) éNÚutf8Úutf16zutf16-bezutf16-leÚutf32zutf32-bezutf32-lescoding[:=]\s*([-\w.]+)cCsšx0tD](\}}|j|ƒr|t|ƒd…j|ƒSqWxV|jdƒdd…D]@}|dd…dkrFtj|ƒrFtj|ƒjƒdjdƒ}|j|ƒSqFW|jtj dƒƒS) zŠCheck a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3Nó éréó#ÚasciiF) ÚBOMSÚ startswithÚlenÚdecodeÚsplitÚ ENCODING_REÚsearchÚgroupsÚlocaleÚgetpreferredencoding)ÚdataZbomÚencodingÚline©rú/usr/lib/python3.6/encoding.pyÚ auto_decodes r)ÚcodecsrÚreÚBOM_UTF8Ú BOM_UTF16Ú BOM_UTF16_BEÚ BOM_UTF16_LEÚ BOM_UTF32Ú BOM_UTF32_BEÚ BOM_UTF32_LEr ÚcompilerrrrrrÚs