Your IP : 18.218.8.237
�
s�h�B� ��/SQrSSKJr SSKrSSKrSSKJr SSKJr Sr Sr
SrS rS
r
SrSr0S
\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S\ \ S4_S
S_S\
\
S4_S\
\
S4_S\
SS4_S\
SS4_\
SS4\
\
S4\\
S4S .Er0S!S
_S"S
_S#S_S$S_S%S_S&S_S'S_S(S_S)S_S*S_S+S_S,S_S-S_S.S_S/S_S0S_S1S_SSSS2SS3S
S4.ErS5S6SS7.rSS8jrS9rS:rS;r"S<S=5rg)>)�Charset� add_alias�add_charset� add_codec�)�partialN)�errors)�encode_7or8bit�����us-asciizunknown-8bit�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-16zwindows-1252�viscii)NNN�big5�gb2312zeuc-jp�iso-2022-jp� shift_jis�utf-8)rzkoi8-rr�latin_1zlatin-1�latin_2zlatin-2�latin_3zlatin-3�latin_4zlatin-4�latin_5zlatin-5�latin_6zlatin-6�latin_7zlatin-7�latin_8zlatin-8�latin_9zks_c_5601-1987zeuc-kr)zlatin-9�latin_10zlatin-10�cp949�euc_jp�euc_kr�ascii�eucgb2312_cn�big5_tw)rrrc�D�U[:Xa[S5eXU4[U'g)a�Add character set properties to the global registry.
charset is the input character set, and must be the canonical name of a
character set.
Optional header_enc and body_enc is either charset.QP for
quoted-printable, charset.BASE64 for base64 encoding, charset.SHORTEST for
the shortest of qp or base64 encoding, or None for no encoding. SHORTEST
is only valid for header_enc. It describes how message headers and
message bodies in the input charset are to be encoded. Default is no
encoding.
Optional output_charset is the character set that the output should be
in. Conversions will proceed from input charset, to Unicode, to the
output charset when the method Charset.convert() is called. The default
is to output in the same character set as the input.
Both input_charset and output_charset must have Unicode codec entries in
the module's charset-to-codec mapping; use add_codec(charset, codecname)
to add codecs the module does not know about. See the codecs module's
documentation for more information.
z!SHORTEST not allowed for body_encN)�SHORTEST�
ValueError�CHARSETS)�charset�
header_enc�body_enc�output_charsets �4/opt/alt/python313/lib64/python3.13/email/charset.pyrrjs'��.�8���<�=�=�#�~�>�H�W��c��U[U'g)z�Add a character set alias.
alias is the alias name, e.g. latin-1
canonical is the character set's canonical name, e.g. iso-8859-1
N)�ALIASES)�alias� canonicals r.rr�s
���G�E�Nr/c��U[U'g)aAdd a codec that map characters in the given charset to/from Unicode.
charset is the canonical name of a character set. codecname is the name
of a Python codec, as appropriate for the second argument to the unicode()
built-in, or to the encode() method of a Unicode string.
N)� CODEC_MAP)r*� codecnames r.rr�s��#�I�g�r/c�\�U[:XaURSS5$URU5$)Nr#�surrogateescape)�UNKNOWN8BIT�encode)�string�codecs r.�_encoder=�s+������}�}�W�&7�8�8��}�}�U�#�#r/c�T�\rSrSrSr\4SjrSrSrSr Sr
SrS rS
r
SrSrg
)r�a�Map character sets to their email properties.
This class provides information about the requirements imposed on email
for a specific character set. It also provides convenience routines for
converting between character sets, given the availability of the
applicable codecs. Given a character set, it will do its best to provide
information on how to use that character set in an email in an
RFC-compliant way.
Certain character sets must be encoded with quoted-printable or base64
when used in email headers or bodies. Certain character sets must be
converted outright, and are not allowed in email. Instances of this
module expose the following information about a character set:
input_charset: The initial character set specified. Common aliases
are converted to their `official' email names (e.g. latin_1
is converted to iso-8859-1). Defaults to 7-bit us-ascii.
header_encoding: If the character set must be encoded before it can be
used in an email header, this attribute will be set to
charset.QP (for quoted-printable), charset.BASE64 (for
base64 encoding), or charset.SHORTEST for the shortest of
QP or BASE64 encoding. Otherwise, it will be None.
body_encoding: Same as header_encoding, but describes the encoding for the
mail message's body, which indeed may be different than the
header encoding. charset.SHORTEST is not allowed for
body_encoding.
output_charset: Some character sets must be converted before they can be
used in email headers or bodies. If the input_charset is
one of them, this attribute will contain the name of the
charset output will be converted to. Otherwise, it will
be None.
input_codec: The name of the Python codec used to convert the
input_charset to Unicode. If no conversion codec is
necessary, this attribute will be None.
output_codec: The name of the Python codec used to convert Unicode
to the output_charset. If no conversion codec is necessary,
this attribute will have the same value as the input_codec.
c��[U[5(aURS5 O
[US5nUR
5n[RX5Ul [RUR[[S45up#nU(dURnX l
X0l[RXD5Ul[ RURUR5Ul[ RURUR5Ulg![a [R
"U5ef=f)Nr#)�
isinstance�strr:�UnicodeErrorr�CharsetError�lowerr1�get�
input_charsetr)r'�BASE64�header_encoding�
body_encodingr-r5�input_codec�output_codec)�selfrG�henc�benc�convs r.�__init__�Charset.__init__�s
��
5��-��-�-��$�$�W�-� #�M�7� ;�
�&�+�+�-�
�$�[�[��F���$�<�<��(:�(:�)1�6�4�(@�B���D���%�%�D�#��!��%�k�k�$�5���%�=�=��);�);�)-�);�);�=���%�M�M�$�*=�*=�*.�*=�*=�?����)� 5��%�%�m�4�4� 5�s�&D&�D&�&!Ec�6�URR5$�N)rGrE�rMs r.�__repr__�Charset.__repr__�s���!�!�'�'�)�)r/c�L�[U5[U5R5:H$rT)rBrE)rM�others r.�__eq__�Charset.__eq__�s���4�y�C��J�,�,�.�.�.r/c��UR[:wdeUR[:XagUR[:Xag[$)aReturn the content-transfer-encoding used for body encoding.
This is either the string `quoted-printable' or `base64' depending on
the encoding used, or it is a function in which case you should call
the function with a single argument, the Message object being
encoded. The function should then set the Content-Transfer-Encoding
header itself to whatever is appropriate.
Returns "quoted-printable" if self.body_encoding is QP.
Returns "base64" if self.body_encoding is BASE64.
Returns conversion function otherwise.
zquoted-printable�base64)rJr'�QPrHr rUs r.�get_body_encoding�Charset.get_body_encoding�s@���!�!�X�-�-�-�����#�%�
�
�
�6�
)��!�!r/c�@�UR=(d UR$)zwReturn the output character set.
This is self.output_charset if that is not None, otherwise it is
self.input_charset.
)r-rGrUs r.�get_output_charset�Charset.get_output_charset
s���"�"�8�d�&8�&8�8r/c��UR=(d Sn[X5nURU5nUcU$URX25$)afHeader-encode a string by converting it first to bytes.
The type of encoding (base64 or quoted-printable) will be based on
this charset's `header_encoding`.
:param string: A unicode string for the header. It must be possible
to encode this string to bytes using the character set's
output codec.
:return: The encoded string, with RFC 2047 chrome.
r)rLr=�_get_encoder�
header_encode)rMr;r<�header_bytes�encoder_modules r.rf�Charset.header_encodesJ���!�!�/�Z���v�-���*�*�<�8���!��M��+�+�L�@�@r/c��UR=(d Sn[X5nURU5n[URUS9nUR5n[
U5[-n/n /n
[U5U-
nUH�nU
RU5 [RU
5n
UR[X�55nX�:�dMJU
R5 U (dU
(dU RS5 O7[RU
5n[X�5nU RU"U55 U/n
[U5U-
nM� [RU
5n[X�5nU RU"U55 U $)a�Header-encode a string by converting it first to bytes.
This is similar to `header_encode()` except that the string is fit
into maximum line lengths as given by the argument.
:param string: A unicode string for the header. It must be possible
to encode this string to bytes using the character set's
output codec.
:param maxlengths: Maximum line length iterator. Each element
returned from this iterator will provide the next maximum line
length. This parameter is used as an argument to built-in next()
and should never be exhausted. The maximum line lengths should
not count the RFC 2047 chrome. These line lengths are only a
hint; the splitter does the best it can.
:return: Lines of encoded strings, each with RFC 2047 chrome.
r)r*N)rLr=rerrfrb�len�RFC2047_CHROME_LEN�next�append�EMPTYSTRING�join�
header_length�pop)rMr;�
maxlengthsr<rgrh�encoderr*�extra�lines�current_line�maxlen� character� this_line�length�joined_lines r.�header_encode_lines�Charset.header_encode_lines%sL��$�!�!�/�Z���v�-���*�*�<�8���.�6�6��F���)�)�+���G��1�1�������j�!�E�)���I���� �*�#�(�(��6�I�#�1�1�'�)�2M�N�F���� � �"��\��L�L��&�"-�"2�"2�<�"@�K�#*�;�#>�L��L�L���!6�7� )�{���j�)�E�1�� � "�&�&�|�4���{�2��
���W�\�*�+��r/c��UR[:Xa[R$UR[:Xa[R
$UR[:Xac[RRU5n[R
RU5nX#:a[R$[R
$grT)rIrH�email�
base64mimer^�
quoprimimer'rq)rMrg�len64�lenqps r.re�Charset._get_encoderbs������6�)��#�#�#�
�
!�
!�R�
'��#�#�#�
�
!�
!�X�
-��$�$�2�2�<�@�E��$�$�2�2�<�@�E��}��'�'�'��'�'�'�r/c�@�U(dU$UR[LaO[U[5(aUR UR
5n[RRU5$UR[La`[U[5(aUR UR
5nURS5n[RRU5$[U[5(a*UR UR
5RS5nU$)aFBody-encode a string by converting it first to bytes.
The type of encoding (base64 or quoted-printable) will be based on
self.body_encoding. If body_encoding is None, we assume the
output charset is a 7bit encoding, so re-encoding the decoded
string using the ascii codec produces the correct string version
of the content.
�latin1r#)rJrHrArBr:r-r�r��body_encoder^�decoder�)rMr;s r.r��Charset.body_encodeqs�����M�����'��&�#�&�&����t�':�':�;���#�#�/�/��7�7�
�
�
�2�
%��&�#�&�&����t�':�':�;���]�]�8�,�F��#�#�/�/��7�7��&�#�&�&����t�':�':�;�B�B�7�K���Mr/)rJrIrGrKr-rLN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__�DEFAULT_CHARSETrQrVrZr_rbrfr}rer��__static_attributes__�r/r.rr�s=��*�V&5�?�B*�/�"�*9�A�&;�z
�r/r)�__all__� functoolsr�email.base64mimer��email.quoprimimer�email.encodersr r^rHr'rlr�r9ror)r1r5rrrr=rr�r/r.�<module>r�s���
������)�����������������B�r��-���B�r��-���B�r��-� �
�B�r��-���B�r��-���B�r��-���B�r��-���B�r��-���B�r��-�� �B�r��-�!�"�B�r��-�#�$
�B�r��-�%�&�-�'�(�F�v��-�)�*
�F�v��-�+�,
�F�t�
�6�-�.�F�t�
�6�/�0�t��-��v��-��v�w�/�5��>�
�|��
�|���|���|� �
�|���|�
��|���|���|���|���}���}���}���}���}�� �}�!�"�}�#�$�������1��<"���
� �?�8�#�$�l�lr/
?>