python (3.12.0)
ˑe d Z g dZdZdZdZdZ ddlmZmZ d Z
d
ZddZddZ
dd
ZddZd Zd Zd Zedk( r e yy# e $ r dZdZY 8w xY w)zHConversions to/from quoted-printable transport encoding as per RFC 1521.)encodedecodeencodestringdecodestring =L s 0123456789ABCDEF )a2b_qpb2a_qpNc T | dv r|S | dk( r|S | t k( xs d| cxk xr dk nc S )zDecide whether a particular byte ordinal needs to be quoted.
The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted. Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
_ ~)ESCAPE)c quotetabsheaders :/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/quopri.pyneedsquotingr s9 F{Dy
;1tq0D011r c h t | } t t t | dz t | dz f z S )zQuote a single character. )ordr bytesHEXr s r quoter $ s2 AAE3q"u:s1R4y1222r c t 0| j }t ||| }|j | y|dfd}d}| j x}rg } d}
|dd dk( r|dd }d}
|D ]P }t |f }t ||| rt
| }|r|dk( r| j d @| j | R | || t j | }t | t kD r3 ||dt d z
d
|t d z
d }t | t kD r3|}| j x}r| ||
yy)av Read 'input', apply quoted-printable encoding, and write to 'output'.
'input' and 'output' are binary file objects. The 'quotetabs' flag
indicates whether embedded tabs and spaces should be quoted. Note that
line-ending tabs and spaces are always encoded, as per RFC 1521.
The 'header' flag indicates whether we are encoding spaces as _ as per RFC
1522.Nr r
c | r.| dd dv r'|j | d d t | dd z |z y | dk( r|j t | |z y |j | |z y )Nr
.)writer )soutputlineEnds r r$ zencode.<locals>.write; sf
236!LL3B%"#-/'9:
$YLLqG+,LLW%r r r"