PyDocs

Nav

Internet Data Handling

Charset.header_encode_lines

  • Charset.header_encode_lines(string, maxlengths)
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.
0 Examples
No examples for email.charset/Charset.header_encode_lines.
See Also
No see-alsos for email.charset/Charset.header_encode_lines
0 Notes
No notes for Charset.header_encode_lines