관리-도구
편집 파일: utils.cpython-37.pyc
B �b\$ � @ s, yd dl ZW n ek r( d dlZY nX d dlZd dlZd dlmZ d dlmZ d dl m Z d dlmZ d dl mZmZmZmZmZ d dlmZ dd lmZmZmZmZmZmZ e ed �eed�dd ��Ze ed �eed�dd��Ze ed �eee d�dd��Z e ed �eed�dd��Z!eed�dd�Z"e ed �eed�dd��Z#e ed �eed�dd��Z$e ed �eed�dd��Z%e ed �eed�dd��Z&e ed �eed�dd��Z'eed�d d!�Z(e ed �eed�d"d#��Z)e ed �eed�d$d%��Z*e ed �eed�d&d'��Z+e ed �eed�d(d)��Z,e ed �eed�d*d+��Z-e e.e�d �eed,�d-d.��Z/dNe0e1ee d0�d1d2�Z2e d3d �eed4�d5d6��Z3e0eee e0f d7�d8d9�Z4eed:�d;d<�Z5dOeeed>�d?d@�Z6eee dA�dBdC�Z7eee8dD�dEdF�Z9eeedD�dGdH�Z:dIej;dJfee1eddK�dLdM�Z<dS )P� N)�IncrementalDecoder)�aliases)� lru_cache)�findall)�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 C sT yt �| �}W n tk r" dS X d|kpRd|kpRd|kpRd|kpRd|kpRd|kS )NFz WITH GRAVEz WITH ACUTEzWITH CEDILLAzWITH DIAERESISzWITH CIRCUMFLEXz WITH TILDE)�unicodedata�name� ValueError)r �description� r �I/opt/alt/python37/lib/python3.7/site-packages/charset_normalizer/utils.py�is_accentuated s r c C s. t �| �}|s| S |�d�}tt|d d��S )N� r � )r Z decomposition�split�chr�int)r Z decomposed�codesr r r � remove_accent* s r# c C s. t | �}x t�� D ]\}}||kr|S qW dS )zK Retrieve the Unicode range official name from a single character. N)�ordr �items)r Z character_ord� range_nameZ ord_ranger r r � unicode_range5 s r'