<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

‹“ReÖ
  ã               @   sŸ   d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 d d l m Z d d d	 „ Z d d
 d „ Z e d k r› e ƒ  d S)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.

é    )Úabsolute_importÚprint_functionÚunicode_literalsN)Ú__version__)ÚPY2)ÚUniversalDetectorÚstdinc             C   s¤   t  ƒ  } x1 |  D]) } t | ƒ } | j | ƒ | j r Pq W| j ƒ  | j } t rn | j t j	 ƒ  d ƒ } | d r“ d j
 | | d | d ƒ Sd j
 | ƒ Sd S)zý
    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
    ÚignoreÚencodingz{0}: {1} with confidence {2}Ú
confidencez{0}: no resultN)r   Ú	bytearrayÚfeedÚdoneÚcloseÚresultr   ÚdecodeÚsysÚgetfilesystemencodingÚformat)ÚlinesÚnameÚuÚliner   © r   ú‘/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/chardet/cli/chardetect.pyÚdescription_of   s    
		
	
r   c          
   C   sâ   t  j d d ƒ } | j d d d d t  j d ƒ d d	 d
 t rH t j n	 t j j g ƒ| j d d d d d j t	 ƒ ƒ| j
 |  ƒ } xR | j D]G } | j ƒ  rÄ t d d d d d t j ƒt t | | j ƒ ƒ q“ Wd S)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
    ÚdescriptionzVTakes one or more file paths and reports their detected                      encodingsÚinputÚhelpz^File whose encoding we would like to determine.                               (default: stdin)ÚtypeÚrbÚnargsÚ*Údefaultz	--versionÚactionÚversionz%(prog)s {0}z0You are running chardetect interactively. Press z8CTRL-D twice at the start of a blank line to signal the z4end of your input. If you want help, run chardetect z--help
ÚfileN)ÚargparseÚArgumentParserÚadd_argumentÚFileTyper   r   r   Úbufferr   r   Ú
parse_argsr   ÚisattyÚprintÚstderrr   r   )ÚargvÚparserÚargsÚfr   r   r   Úmain6   s    			r4   Ú__main__)Ú__doc__Ú
__future__r   r   r   r'   r   Zpip._vendor.chardetr   Zpip._vendor.chardet.compatr   Ú%pip._vendor.chardet.universaldetectorr   r   r4   Ú__name__r   r   r   r   Ú<module>   s   