Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/local/lib/python3.6/site-packages/charset_normalizer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.6/site-packages/charset_normalizer/__pycache__/utils.cpython-36.pyc
3

G�Kd\$�@s,yddlZWnek
r(ddlZYnXddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZmZmZmZmZddlmZdd	lmZmZmZmZmZmZe
ed
�eed�dd
��Ze
ed
�eed�dd��Ze
ed
�eeed�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/dNe0e1eed0�d1d2�Z2e
d3d
�eed4�d5d6��Z3e0eeee0fd7�d8d9�Z4eed:�d;d<�Z5dOeeed>�d?d@�Z6eeedA�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�returncCsTytj|�}Wntk
r"dSXd|kpRd|kpRd|kpRd|kpRd|kpRd|kS)NFz
WITH GRAVEz
WITH ACUTEzWITH CEDILLAzWITH DIAERESISzWITH CIRCUMFLEXz
WITH TILDE)�unicodedata�name�
ValueError)r�description�r�F/tmp/pip-build-8nxjc3nm/charset-normalizer/charset_normalizer/utils.py�is_accentuatedsrcCs.tj|�}|s|S|jd�}tt|dd��S)N� r�)r�
decomposition�split�chr�int)rZ
decomposed�codesrrr�
remove_accent*s


r$cCs.t|�}x tj�D]\}}||kr|SqWdS)zK
    Retrieve the Unicode range official name from a single character.
    N)�ordr�items)rZ
character_ord�
range_nameZ	ord_rangerrr�
unicode_range5s
r(cCs,ytj|�}Wntk
r"dSXd|kS)NFZLATIN)rrr)rrrrr�is_latinCs
r)cCs(y|jd�Wntk
r"dSXdS)N�asciiFT)�encode�UnicodeEncodeError)rrrr�is_asciiLs
r-cCs2tj|�}d|krdSt|�}|dkr*dSd|kS)N�PTFZPunctuation)r�categoryr()r�character_category�character_rangerrr�is_punctuationTs
r2cCs:tj|�}d|ksd|krdSt|�}|dkr2dSd|kS)N�S�NTFZForms)rr/r()rr0r1rrr�	is_symbolcs
r5cCst|�}|dkrdSd|kS)NFZ	Emoticons)r()rr1rrr�is_emoticonrsr6cCs&|j�s|d	krdStj|�}d|kS)
N�|�+�,�;�<�>T�Z>r9r;r7r8r<r:)�isspacerr/)rr0rrr�is_separator|s
r?cCs|j�|j�kS)N)�islower�isupper)rrrr�is_case_variable�srBcCstj|�}|dkS)N�Co)rr/)rr0rrr�is_private_use_only�s
rDcCs,ytj|�}Wntk
r"dSXd|kS)NF�CJK)rrr)r�character_namerrr�is_cjk�s
rGcCs,ytj|�}Wntk
r"dSXd|kS)NFZHIRAGANA)rrr)rrFrrr�is_hiragana�s
rHcCs,ytj|�}Wntk
r"dSXd|kS)NFZKATAKANA)rrr)rrFrrr�is_katakana�s
rIcCs,ytj|�}Wntk
r"dSXd|kS)NFZHANGUL)rrr)rrFrrr�	is_hangul�s
rJcCs,ytj|�}Wntk
r"dSXd|kS)NFZTHAI)rrr)rrFrrr�is_thai�s
rK)r'rcst�fdd�tD��S)Nc3s|]}|�kVqdS)Nr)�.0�keyword)r'rr�	<genexpr>�sz-is_unicode_range_secondary.<locals>.<genexpr>)�anyr)r'r)r'r�is_unicode_range_secondary�srP�)�sequence�search_zonercCs�t|t�st�t|�}tt|dt||��jddd��}t|�dkrHdSxJ|D]B}|j�j	dd�}x,t
j�D] \}}||kr�|S||krl|SqlWqNWdS)zW
    Extract using ASCII-only decoder any specified encoding in the first n-bytes.
    Nr*�ignore)�errorsr�-�_)�
isinstance�bytes�	TypeError�lenrr�min�decode�lower�replacerr&)rRrSZseq_len�resultsZspecified_encoding�encoding_alias�
encoding_ianarrr�any_specified_encoding�s 

rc�)rrc
Cs |dkpttjd
j|��jt�S)zQ
    Verify is a specific encoding is a multi byte one based on it IANA name
    �utf_8�	utf_8_sig�utf_16�	utf_16_be�	utf_16_le�utf_32�	utf_32_le�	utf_32_be�utf_7zencodings.{}>	rerjrirfrkrhrlrmrg)�
issubclass�	importlib�
import_module�formatrr)rrrr�is_multi_byte_encoding�srr)rRrcCsJxDtD]<}t|}t|t�r"|g}x|D]}|j|�r(||fSq(WqWdS)z9
    Identify and extract SIG/BOM in given sequence.
    N�)Nrs)r
rXrY�
startswith)rR�
iana_encodingZmarks�markrrr�identify_sig_or_bom�s



rw)rurcCs|dkS)Nrgrj>rjrgr)rurrr�should_strip_sig_or_bomsrxT)�cp_name�strictrcCsL|j�jdd�}x$tj�D]\}}|||gkr|SqW|rHtdj|���|S)NrVrWz Unable to retrieve IANA for '{}')r^r_rr&rrq)ryrzrarbrrr�	iana_namesr{)�decoded_sequencercCs8t�}x(|D] }t|�}|dkr"q|j|�qWt|�S)N)�setr(�add�list)r|�rangesrr1rrr�
range_scans
r�)�iana_name_a�iana_name_brc	Cs�t|�st|�rdStjdj|��j}tjdj|��j}|dd�}|dd�}d}x6td�D]*}t|g�}|j|�|j|�krZ|d7}qZW|dS)	Ngzencodings.{}rT)rUr�r�)rrrorprqr�rangerYr])	r�r�Z	decoder_aZ	decoder_bZid_aZid_bZcharacter_match_count�iZ
to_be_decodedrrr�
cp_similarity+s


r�cCs|tko|t|kS)z�
    Determine if two code page are at least 80% similar. IANA_SUPPORTED_SIMILAR dict was generated using
    the function cp_similarity.
    )r)r�r�rrr�
is_cp_similar@sr�Zcharset_normalizerz)%(asctime)s | %(levelname)s | %(message)s)r�level�
format_stringrcCs:tj|�}|j|�tj�}|jtj|��|j|�dS)N)�logging�	getLogger�setLevel�
StreamHandler�setFormatter�	Formatter�
addHandler)rr�r��logger�handlerrrr�set_logging_handlerKs


r�)rQ)T)=Zunicodedata2r�ImportErrorror��codecsrZencodings.aliasesr�	functoolsr�rerZtypingrrrr	r
Z_multibytecodecrZconstantr
rrrrr�str�boolrr$r(r)r-r2r5r6r?rBrDrGrHrIrJrKr[rPrYr"rcrrrwrxr{r��floatr�r��INFOr�rrrr�<module>sr 


							



haha - 2025