Your IP : 18.224.51.49


Current Path : /opt/alt/python310/lib64/python3.10/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/encodings/__pycache__/__init__.cpython-310.opt-2.pyc

o

6��f��@s�	ddlZddlZddlmZiZdZdgZejZGdd�dee	�Z
dd	�Zd
d�Ze�
e�ejdkr?d
d�Ze�
e�dSdS)�N�)�aliasesz--unknown--�*c@seZdZdS)�CodecRegistryErrorN)�__name__�
__module__�__qualname__�r	r	�9/opt/alt/python310/lib64/python3.10/encodings/__init__.pyr(srcCsp	t|t�rt|d�}g}d}|D]!}|��s|dkr0|r$|r$|�d�|��r-|�|�d}qd}qd�|�S)N�asciiF�.�_T�)�
isinstance�bytes�str�isalnum�append�isascii�join)�encoding�chars�punct�cr	r	r
�normalize_encoding+s





rc
	CsPt�|t�}|tur|St|�}t�|�pt�|�dd��}|dur'||g}n|g}|D]}|r4d|vr5q,ztd|tdd�}Wn	tyIYq,wnd}z|j	}Wnt
y^d}Ynw|duridt|<dS|�}t|tj
��sdt|�krdks�ntd|j|jf��t|d�r�t|d	�r�|d
dur�t|d
�r�|ddur�t|d�r�t|�dkr�|ddur�t|d�r�t|�dkr�|ddur�t|d�s�td
|j|jf��t|�dks�|ddur�|ddt|�|j�dd	�d	f7}tj
|�}|t|<z|��}Wnt
�yY|Sw|D]}	|	tv�r$|t|	<�q|S)Nrr
z
encodings.r)�fromlist�level��z#module "%s" (%s) failed to registerr���z'incompatible codecs in module "%s" (%s)�)N)�_cache�get�_unknownr�_aliases�replace�
__import__�_import_tail�ImportError�getregentry�AttributeErrorr�codecs�	CodecInfo�lenrr�__file__�callable�split�
getaliases)
r�entry�
norm_encoding�aliased_encoding�modnames�modname�modr+�codecaliases�aliasr	r	r
�search_functionGsz	
��

��
�
�$$
�(
�
�r<Zwin32cCsLzddl}d|��}||krddl}|j��WSWdSty%YdSw)Nrzcp%s)�_winapiZGetACPZencodings.mbcs�mbcsr+r*)rr=Zansi_code_pageZ	encodingsr	r	r
�_alias_mbcs�s��r?)r-�sysrrr#r%r)r&�LookupError�SystemErrorrrr<�register�platformr?r	r	r	r
�<module>s 
U
�

?>