summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2011-01-05 01:47:38 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2011-01-05 01:47:38 (GMT)
commitf9844c8292c34fe4361d441164d83642fc76ce68 (patch)
treefafccdd877c3db36d58e130583452a71f444dd74 /Doc
parent1d879f68525858fcfa7aacdd7cd16721a89c62c4 (diff)
downloadcpython-f9844c8292c34fe4361d441164d83642fc76ce68.zip
cpython-f9844c8292c34fe4361d441164d83642fc76ce68.tar.gz
cpython-f9844c8292c34fe4361d441164d83642fc76ce68.tar.bz2
Merged revisions 87750 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87750 | r.david.murray | 2011-01-04 20:39:32 -0500 (Tue, 04 Jan 2011) | 5 lines #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.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst
index 1d530b2..796ac97 100644
--- a/Doc/library/email.header.rst
+++ b/Doc/library/email.header.rst
@@ -94,15 +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.
+ the character set of the characters in the string.
- Optional *errors* is passed through to any :func:`encode` or
- :func:`ustr.encode` call, and defaults to "strict".
+ 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)