관리-도구
편집 파일: escprober.cpython-311.pyc
� �Ren � �f � d dl mZ d dlmZ d dlmZmZmZ d dlm Z m Z mZmZ G d� de� � Z dS )� )� CharSetProber)�CodingStateMachine)�LanguageFilter�ProbingState�MachineState)�HZ_SM_MODEL�ISO2022CN_SM_MODEL�ISO2022JP_SM_MODEL�ISO2022KR_SM_MODELc �f � � e Zd ZdZd � fd� Z� fd�Zed� � � Zed� � � Zd� Z d� Z � xZS ) �EscCharSetProberz� This CharSetProber uses a "code scheme" approach for detecting encodings, whereby easily recognizable escape or shift sequences are relied on to identify these encodings. Nc � �� t t | � � � |�� � g | _ | j t j z rX| j � t t � � � � | j � t t � � � � | j t j z r,| j � t t � � � � | j t j z r,| j � t t � � � � d | _ d | _ d | _ d | _ | � � � d S )N)�lang_filter)�superr �__init__� coding_smr r �CHINESE_SIMPLIFIED�appendr r r �JAPANESEr �KOREANr �active_sm_count�_detected_charset�_detected_language�_state�reset)�selfr � __class__s ���/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/chardet/escprober.pyr zEscCharSetProber.__init__* s �� � ���%�%�.�.�;�.�G�G�G������n�?�?� J��N�!�!�"4�[�"A�"A�B�B�B��N�!�!�"4�5G�"H�"H�I�I�I���n�5�5� J��N�!�!�"4�5G�"H�"H�I�I�I���n�3�3� J��N�!�!�"4�5G�"H�"H�I�I�I�#���!%���"&������� � ������ c �� �� t t | � � � � � | j D ] }|s�d|_ |� � � �!t | j � � | _ d | _ d | _ d S )NT) r r r r �active�lenr r r )r r r s �r r zEscCharSetProber.reset: s �� � ���%�%�+�+�-�-�-��� � �I�� ��#�I���O�O�����"�4�>�2�2���!%���"&����r c � � | j S �N�r �r s r �charset_namezEscCharSetProber.charset_nameE s � ��%�%r c � � | j S r$ )r r&