rfc.quoted-printable- Quoted-printable encoding/decoding
This module defines a few functions to encode/decode Quoted-printable format, defined in RFC 2045 (RFC2045), section 6.7.
Reads byte stream from the current input port, encodes it in Quoted-printable
format and writes the result character stream to the current output port.
The conversion ends when it reads EOF from the current input port.
The keyword argument line-width specifies the maximum
line width of the generated output in characters. If the encoded
output creates a long line, the procedure inserts a “soft line break”
so that the each line is equal to or shorter than this number.
Soft line breaks are removed when quoted-printable text is
The default line width is 76. (The minimum meaningful number of
line-width is 4). You can suppress soft line breaks by
0 to line-width.
for each line break in the input (“hard line break”).
When a true value is given to the keyword argument binary,
#x0d in the input are encoded
=0D, respectively. See RFC2045 section 6.7
for the details.
Converts contents of string to Quoted-printable encoded format. Input string can be either complete or incomplete string; it is always interpreted as a byte sequence.
The keyword arguments are the same as
Reads character stream from the current input port, decodes it from Quoted-printable format and writes the result byte stream to the current output port. The conversion ends when it reads EOF. If it encounters illegal character sequence (such as ’=’ followed by non-hexadecimal characters), it copies them literally to the output.
Decodes a Quoted-printable encoded string string and returns the result as a string.