관리-도구
편집 파일: eucjpprober.cpython-35.pyc
��Re� � @ s� d d l m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z Gd d � d e � Z d S) � )�ProbingState�MachineState)�MultiByteCharSetProber)�CodingStateMachine)�EUCJPDistributionAnalysis)�EUCJPContextAnalysis)�EUCJP_SM_MODELc sp e Z d Z � f d d � Z � f d d � Z e d d � � Z e d d � � Z d d � Z d d � Z � S) �EUCJPProberc sH t t | � j � t t � | _ t � | _ t � | _ | j � d S)N)�superr �__init__r r � coding_smr �distribution_analyzerr �context_analyzer�reset)�self)� __class__� ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/chardet/eucjpprober.pyr % s zEUCJPProber.__init__c s$ t t | � j � | j j � d S)N)r r r r )r )r r r r , s zEUCJPProber.resetc C s d S)NzEUC-JPr )r r r r �charset_name0 s zEUCJPProber.charset_namec C s d S)N�Japaneser )r r r r �language4 s zEUCJPProber.languagec C s� xAt t | � � D]-} | j j | | � } | t j k rm | j j d | j | j | � t j | _ Pq | t j k r� t j | _ Pq | t j k r | j j � } | d k r� | d | j d <| j j | j | � | j j | j | � q | j j | | d | d � | � | j j | | d | d � | � q W| d | j d <| j t j k r�| j j � r�| j � | j k r�t j | _ | j S)Nz!%s %s prober hit error at byte %s� r ���)�range�lenr � next_stater �ERROR�logger�debugr r r �NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlen� _last_charr �feedr �state� DETECTING�got_enough_data�get_confidence�SHORTCUT_THRESHOLD)r �byte_str�i�coding_state�char_lenr r r r&