diff options
author | R. David Murray <rdmurray@bitdance.com> | 2011-01-05 01:39:32 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2011-01-05 01:39:32 (GMT) |
commit | 477efb394412314d47fdfb3f7c287edb028809c0 (patch) | |
tree | 570907b128aae2ce7417d08061dbe0e5f5a67cf9 /Doc | |
parent | ca1e7ec3444c372335c96f83d1550b16b0783557 (diff) | |
download | cpython-477efb394412314d47fdfb3f7c287edb028809c0.zip cpython-477efb394412314d47fdfb3f7c287edb028809c0.tar.gz cpython-477efb394412314d47fdfb3f7c287edb028809c0.tar.bz2 |
#10790: make append work when output codec is different from input codec
There's still a bug here (the encode call shouldn't use the 'errors'
paramter), but I'll fix that later.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/email.header.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index 113a6b8..808f7e5 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -94,14 +94,15 @@ Here is the :class:`Header` class description: decoded with that character set. If *s* is an instance of :class:`str`, then *charset* is a hint specifying - the character set of the characters in the string. In this case, when - producing an :rfc:`2822`\ -compliant header using :rfc:`2047` rules, the - Unicode string will be encoded using the following charsets in order: - ``us-ascii``, the *charset* hint, ``utf-8``. The first character set to - not provoke a :exc:`UnicodeError` is used. - - Optional *errors* is passed through to any :func:`encode` or - :func:`ustr.encode` call, and defaults to "strict". + the character set of the characters in the string. + + In either case, when producing an :rfc:`2822`\ -compliant header using + :rfc:`2047` rules, the string will be encoded using the output codec of + the charset. If the string cannot be encoded using the output codec, a + UnicodeError will be raised. + + Optional *errors* is passed as the errors argument to the decode call + if *s* is a byte string. .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n') |