diff options
author | R. David Murray <rdmurray@bitdance.com> | 2011-01-07 23:25:30 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2011-01-07 23:25:30 (GMT) |
commit | 9253214fd9fe22b8b2b4ca5bb28952df8cab3e8c (patch) | |
tree | 30d925a75c0b3bd542c00d6dbd667e72178056a7 /Doc/library/email.header.rst | |
parent | 6f0022d84af15d51ffa1606991f2b6e9e56448ed (diff) | |
download | cpython-9253214fd9fe22b8b2b4ca5bb28952df8cab3e8c.zip cpython-9253214fd9fe22b8b2b4ca5bb28952df8cab3e8c.tar.gz cpython-9253214fd9fe22b8b2b4ca5bb28952df8cab3e8c.tar.bz2 |
#10686: recode non-ASCII headers to 'unknown-8bit' instead of ?s.
This applies only when generating strings from non-RFC compliant binary
input; it makes the existing recoding behavior more consistent (ie:
now no data is lost when recoding).
Diffstat (limited to 'Doc/library/email.header.rst')
-rw-r--r-- | Doc/library/email.header.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index ff2b484..29752c4 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -130,8 +130,14 @@ Here is the :class:`Header` class description: .. method:: __str__() - A helper for :class:`str`'s :func:`encode` method. Returns the header as - a Unicode string. + Returns an approximation of the :class:`Header` as a string, using an + unlimited line length. All pieces are converted to unicode using the + specified encoding and joined together appropriately. Any pieces with a + charset of `unknown-8bit` are decoded as `ASCII` using the `replace` + error handler. + + .. versionchanged:: 3.2 + Added handling for the `unknown-8bit` charset. .. method:: __eq__(other) |