3 m�daB# � @ s yd dl ZW n ek r( d dlZY nX d dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlm Z mZmZmZmZ d dlmZ dd lmZmZmZmZmZmZ e ed �eed�dd ��Ze ed �eed�dd��Ze ed �eee d�dd��Ze 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.dIe/e0ee d0�d1d2�Z1e d3d �eed4�d5d6��Z2e/eee e/f d7�d8d9�Z3eed:�d;d<�Z4dJeeed>�d?d@�Z5ee e dA�dBdC�Z6eee7dD�dEdF�Z8eeedD�dGdH�Z9dS )K� 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 j| �}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 �/usr/lib/python3.6/utils.py�is_accentuated s r c C s. t j| �}|s| S |jd�}tt|d d��S )N� r � )r Z decomposition�split�chr�int)r Z decomposedZcodesr r r � remove_accent) s r"