Ë óSuÂW!ùƒã ó¬—dZddlZddlZddlmZmZmZddlmZddl m Z  ddee de d e d e d ee f d „Zdd eee d dfd„Zedk(re«yy)a Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. éN)ÚIterableÚListÚOptionalé)Ú __version__)ÚUniversalDetectorÚlinesÚnameÚminimalÚshould_rename_legacyÚreturncóö—t|¬«}|D],}t|«}|j|«|jsŒ,n|j «|j }|r|dS|dr|›d|d›d|d›�S|›d�S)a° Return a string describing the probable encoding of a file or list of strings. :param lines: The lines to get the encoding of. :type lines: Iterable of bytes :param name: Name of file or collection of lines :type name: str :param should_rename_legacy: Should we rename legacy encodings to their more modern equivalents? :type should_rename_legacy: ``bool`` )r Úencodingz: z with confidence Ú confidencez : no result)rÚ bytearrayÚfeedÚdoneÚcloseÚresult)r r r r ÚuÚliners ú;/usr/lib/python3.12/site-packages/chardet/cli/chardetect.pyÚdescription_ofrs’€ô$ Ð/CÔD€Aۈܘ‹ˆØ �‰ˆtŒ à �6‹6Ù ð ð ‡G�G„IØ �X‰X€FÙØ�jÑ!Ð!Ø ˆjÒØ��r˜& Ñ,Ð-Ð->¸vÀlÑ?SÐ>TÐUÐU؈V�;Ð ÐóÚargvc óB—tjd¬«}|jddtjd«dtj j g¬«|jdd d ¬ «|jd d dd ¬ «|jdddt›�¬«|j|«}|jD]c}|j«rtdtj¬«tt||j|j|j ¬««Œey)zã Handles command line arguments and gets things started. :param argv: List of arguments, as if specified on the command-line. If None, ``sys.argv[1:]`` is used instead. :type argv: list of str zATakes one or more file paths and reports their detected encodings)Ú descriptionÚinputz@File whose encoding we would like to determine. (default: stdin)ÚrbÚ*)ÚhelpÚtypeÚnargsÚdefaultz --minimalz*Print only the encoding to standard outputÚ store_true)r!Úactionz-lz--legacyz,Rename legacy encodings to more modern ones.z --versionÚversionz %(prog)s )r&r'z£You are running chardetect interactively. Press CTRL-D twice at the start of a blank line to signal the end of your input. If you want help, run chardetect --help )Úfile)r r N)ÚargparseÚArgumentParserÚ add_argumentÚFileTypeÚsysÚstdinÚbufferrÚ parse_argsrÚisattyÚprintÚstderrrr r Úlegacy)rÚparserÚargsÚfs rÚmainr8:s€ô× $Ñ $à Oô€Fð  ×ÑØØ OÜ × Ñ ˜tÓ $ØÜ—‘×!Ñ!Ð"ð ôð ×ÑØØ 9Øðôð  ×ÑØ ØØ ;Øð ôð  ×ÑØ˜I°¼;¸-Ð/Hðôð × Ñ ˜TÓ "€Dà �ZŒZˆØ �8‰8Œ:Ü ðô—Z‘Zõ  ô Ü Ø�1—6‘6 4§<¡<ÀdÇkÁkô õ ñrÚ__main__)r.FF)N)Ú__doc__r)r-ÚtypingrrrÚrÚuniversaldetectorrÚbytesÚstrÚboolrr8Ú__name__©rrÚrCs–ðñ óÛ ß+Ñ+åÝ1ð ØØ!&ñ  Ø �E‰?ð à ð ðð ðð  ð ˆc�]ó  ñD2 ˆx˜˜S™ Ñ"ð2 ¨dó2 ðj ˆzÒÙ…Fðr