관리-도구
편집 파일: utils.cpython-311.pyc
� �܋f�- � �� � d dl Zn# e$ r d dlZY nw xY wd dlZd dlZd dlmZ d dlmZ d dl m Z d dlmZ d dl mZmZmZmZmZmZ d dlmZ dd lmZmZmZmZmZmZ e e� � � dedefd �� � Z e e� � � dedefd�� � Z e e� � � dedee fd�� � Z! e e� � � dedefd�� � Z" e e� � � dedefd�� � Z# e e� � � dedefd�� � Z$ e e� � � dedefd�� � Z% e e� � � dedefd�� � Z& e e� � � dedefd�� � Z' e e� � � dedefd�� � Z(dedefd�Z) e e� � � dedefd�� � Z* e e� � � dedefd�� � Z+ e e� � � dedefd�� � Z, e e� � � dedefd�� � Z- e e� � � dedefd�� � Z. e e/e� � � � � dedefd�� � Z0 e e� � � dedefd�� � Z1dCd!e2d"e3dee fd#�Z4 e d$� � � d%edefd&�� � Z5d!e2deee e2f fd'�Z6d(edefd)�Z7dDd+ed,edefd-�Z8d.edee fd/�Z9d0ed1ede:fd2�Z;d0ed1edefd3�Z<d4ej= d5fd%ed6e3d7eddfd8�Z> dEd9e2d:ed;e?d<e3d=ed>ed?e2d@edAee deeddf fdB�Z@dS )F� N)�IncrementalDecoder)�aliases)� lru_cache)�findall)� Generator�List�Optional�Set�Tuple�Union)�MultibyteIncrementalDecoder� )�ENCODING_MARKS�IANA_SUPPORTED_SIMILAR�RE_POSSIBLE_ENCODING_INDICATION�UNICODE_RANGES_COMBINED�UNICODE_SECONDARY_RANGE_KEYWORD�UTF8_MAXIMAL_ALLOCATION)�maxsize� character�returnc � � t j | � � }n# t $ r Y dS w xY wd|v pd|v pd|v pd|v pd|v pd|v S )NFz WITH GRAVEz WITH ACUTEzWITH CEDILLAzWITH DIAERESISzWITH CIRCUMFLEXz WITH TILDE��unicodedata�name� ValueError�r �descriptions �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/charset_normalizer/utils.py�is_accentuatedr s� � ��&�+�I�6�6����� � � ��u�u����� ��#� '��;�&� '��[�(� '� �{�*� '� ��+� '� �;�&� � � � %�%c � � t j | � � }|s| S |� d� � }t t |d d� � � � S )N� r � )r � decomposition�split�chr�int)r � decomposed�codess r � remove_accentr+ , sO � �!�/� �:�:�J�� ���!�'�'��,�,�E��s�5��8�R� � �!�!�!� c �f � t | � � }t j � � D ] \ }}||v r|c S �dS )zK Retrieve the Unicode range official name from a single character. N)�ordr �items)r � character_ord� range_name� ord_ranges r � unicode_ranger3 7 sO � � �Y���M�!8�!>�!@�!@� � �� �I��I�%�%����� &� �4r, c �X � t j | � � }n# t $ r Y dS w xY wd|v S )NF�LATINr r s r �is_latinr6 E sF � ��&�+�I�6�6����� � � ��u�u������k�!�!r! c �V � | � d� � n# t $ r Y dS w xY wdS )N�asciiFT)�encode�UnicodeEncodeError�r s r �is_asciir<