ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/usr/lib64/python3.6/email/__pycache__/
Upload File :
Current File : //proc/self/root/proc/self/root/usr/lib64/python3.6/email/__pycache__/charset.cpython-36.opt-2.pyc

3


 \�B�@srddddgZddlmZddlZddlZddlmZddlmZd	Z	d
Z
dZdZd
Z
dZdZe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfe	e	dfd*e
e
dfe
e
dfe
ddfe
ddfe
ddfe
e
dfee
dfd�Zdddddddddddddddddddddddd
d �Zd!d"dd#�Zd+d$d�Zd%d�Zd&d�Zd'd(�ZGd)d�d�ZdS),�Charset�	add_alias�add_charset�	add_codec�)�partialN)�errors)�encode_7or8bit����zus-asciizunknown-8bit�ziso-2022-jpzutf-8)z
iso-8859-1z
iso-8859-2z
iso-8859-3z
iso-8859-4z
iso-8859-9ziso-8859-10ziso-8859-13ziso-8859-14ziso-8859-15ziso-8859-16zwindows-1252Zvisciizus-ascii�big5�gb2312zeuc-jp�	shift_jisziso-2022-jpzkoi8-rzutf-8z
iso-8859-1z
iso-8859-2z
iso-8859-3z
iso-8859-4z
iso-8859-9ziso-8859-10ziso-8859-13ziso-8859-14ziso-8859-15ziso-8859-16zks_c_5601-1987zeuc-jpzeuc-kr)�latin_1zlatin-1Zlatin_2zlatin-2Zlatin_3zlatin-3Zlatin_4zlatin-4Zlatin_5zlatin-5Zlatin_6zlatin-6Zlatin_7zlatin-7Zlatin_8zlatin-8Zlatin_9zlatin-9Zlatin_10zlatin-10�cp949�euc_jp�euc_kr�ascii�eucgb2312_cn�big5_tw)rrzus-asciicCs"|tkrtd��|||ft|<dS)Nz!SHORTEST not allowed for body_enc)�SHORTEST�
ValueError�CHARSETS)�charsetZ
header_encZbody_enc�output_charset�r�%/usr/lib64/python3.6/email/charset.pyrmscCs|t|<dS)N)�ALIASES)�aliasZ	canonicalrrrr�scCs|t|<dS)N)�	CODEC_MAP)rZ	codecnamerrrr�scCs"|tkr|jdd�S|j|�SdS)Nr�surrogateescape)�UNKNOWN8BIT�encode)�string�codecrrr�_encode�sr'c@s\eZdZefdd�Zdd�ZeZdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS)rc
Cs�y$t|t�r|jd�n
t|d�}Wntk
rBtj|��YnX|j�}tj||�|_	t
j|j	ttdf�\}}}|s~|j	}||_
||_tj||�|_tj|j	|j	�|_tj|j|j�|_dS)Nr)�
isinstance�strr$�UnicodeErrorrZCharsetError�lowerr�get�
input_charsetrr�BASE64�header_encoding�
body_encodingrr!Zinput_codec�output_codec)�selfr-ZhencZbencZconvrrr�__init__�s&

zCharset.__init__cCs
|jj�S)N)r-r+)r2rrr�__str__�szCharset.__str__cCst|�t|�j�kS)N)r)r+)r2�otherrrr�__eq__�szCharset.__eq__cCs$|jtkrdS|jtkrdStSdS)Nzquoted-printable�base64)r0�QPr.r)r2rrr�get_body_encoding�s


zCharset.get_body_encodingcCs|jp
|jS)N)rr-)r2rrr�get_output_charsetszCharset.get_output_charsetcCs6|jpd}t||�}|j|�}|dkr*|S|j||�S)Nzus-ascii)r1r'�_get_encoder�
header_encode)r2r%r&�header_bytes�encoder_modulerrrr<s


zCharset.header_encodecCs|jpd}t||�}|j|�}t|j|d�}|j�}t|�t}g}	g}
t|�|}x�|D]�}|
j	|�t
j|
�}
|jt|
|��}||krZ|
j
�|	r�|
r�|	j	d�n.|	r�dnd}t
j|
�}t||�}|	j	||��|g}
t|�|}qZWt
j|
�}t||�}|	j	||��|	S)Nzus-ascii)r� r
)r1r'r;rr<r:�len�RFC2047_CHROME_LEN�next�append�EMPTYSTRING�join�
header_length�pop)r2r%Z
maxlengthsr&r=r>�encoderrZextra�linesZcurrent_line�maxlen�	characterZ	this_lineZlengthZ	separatorZjoined_linerrr�header_encode_lines,s6









zCharset.header_encode_linescCs`|jtkrtjS|jtkr tjS|jtkrXtjj|�}tjj|�}||krPtjStjSndSdS)N)r/r.�email�
base64mimer8�
quoprimimerrF)r2r=Zlen64Zlenqprrrr;js


zCharset._get_encodercCs�|s|S|jtkr4t|t�r(|j|j�}tjj|�S|jt	krjt|t�rT|j|j�}|j
d�}tjj|�St|t�r�|j|j�j
d�}|SdS)N�latin1r)r0r.r(r)r$rrMrN�body_encoder8�decoderO)r2r%rrrrQys	





zCharset.body_encodeN)�__name__�
__module__�__qualname__�DEFAULT_CHARSETr3r4�__repr__r6r9r:r<rLr;rQrrrrr�s,!>)NNN)NNN)�__all__�	functoolsrZemail.base64mimerMZemail.quoprimimerZemail.encodersrr8r.rrArVr#rDrrr!rrrr'rrrrr�<module>s�
	


Zerion Mini Shell 1.0