o w[e@sPdZgdZddlmZddlmZddZddZ d d Z d d Z d dZ dS)z Encodings and related functions.)encode_7or8bit encode_base64 encode_noop encode_quopri) encodebytes) encodestringcCst|dd}|ddS)NT) quotetabs s=20) _encodestringreplace)sencr%/usr/lib/python3.10/email/encoders.py_qencodes  rcCs0|jdd}tt|d}||d|d<dS)zlEncode the message's payload in Base64. Also, add an appropriate Content-Transfer-Encoding header. Tdecodeasciibase64Content-Transfer-EncodingN) get_payloadstr_bencode set_payloadmsgorigencdatarrrrs   rcCs*|jdd}t|}||d|d<dS)zvEncode the message's payload in quoted-printable. Also, add an appropriate Content-Transfer-Encoding header. Trzquoted-printablerN)rrrrrrrr&s   rcCsX|jdd}|durd|d<dSz|dWnty%d|d<YdSwd|d<dS)z9Set the Content-Transfer-Encoding header to 7bit or 8bit.TrN7bitrr8bit)rr UnicodeError)rrrrrr2s   rcCsdS)z Do nothing.Nr)rrrrrDsrN) __doc____all__rrrquoprirr rrrrrrrrrs