| OLD | NEW |
| 1 :mod:`email`: Internationalized headers | 1 :mod:`email`: Internationalized headers |
| 2 --------------------------------------- | 2 --------------------------------------- |
| 3 | 3 |
| 4 .. module:: email.header | 4 .. module:: email.header |
| 5 :synopsis: Representing non-ASCII headers | 5 :synopsis: Representing non-ASCII headers |
| 6 | 6 |
| 7 | 7 |
| 8 :rfc:`2822` is the base standard that describes the format of email messages. | 8 :rfc:`2822` is the base standard that describes the format of email messages. |
| 9 It derives from the older :rfc:`822` standard which came into widespread use at | 9 It derives from the older :rfc:`822` standard which came into widespread use at |
| 10 a time when most email was composed of ASCII characters only. :rfc:`2822` is a | 10 a time when most email was composed of ASCII characters only. :rfc:`2822` is a |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 The maximum line length can be specified explicit via *maxlinelen*. For | 68 The maximum line length can be specified explicit via *maxlinelen*. For |
| 69 splitting the first line to a shorter value (to account for the field header | 69 splitting the first line to a shorter value (to account for the field header |
| 70 which isn't included in *s*, e.g. :mailheader:`Subject`) pass in the name of
the | 70 which isn't included in *s*, e.g. :mailheader:`Subject`) pass in the name of
the |
| 71 field in *header_name*. The default *maxlinelen* is 76, and the default valu
e | 71 field in *header_name*. The default *maxlinelen* is 76, and the default valu
e |
| 72 for *header_name* is ``None``, meaning it is not taken into account for the | 72 for *header_name* is ``None``, meaning it is not taken into account for the |
| 73 first line of a long, split header. | 73 first line of a long, split header. |
| 74 | 74 |
| 75 Optional *continuation_ws* must be :rfc:`2822`\ -compliant folding whitespace
, | 75 Optional *continuation_ws* must be :rfc:`2822`\ -compliant folding whitespace
, |
| 76 and is usually either a space or a hard tab character. This character will be | 76 and is usually either a space or a hard tab character. This character will be |
| 77 prepended to continuation lines. | 77 prepended to continuation lines. The default *continuation_ws* is a single |
| 78 space character (" "). |
| 78 | 79 |
| 79 Optional *errors* is passed straight through to the :meth:`append` method. | 80 Optional *errors* is passed straight through to the :meth:`append` method. |
| 80 | 81 |
| 81 | 82 |
| 82 .. method:: append(s[, charset[, errors]]) | 83 .. method:: append(s[, charset[, errors]]) |
| 83 | 84 |
| 84 Append the string *s* to the MIME header. | 85 Append the string *s* to the MIME header. |
| 85 | 86 |
| 86 Optional *charset*, if given, should be a :class:`Charset` instance (see | 87 Optional *charset*, if given, should be a :class:`Charset` instance (see |
| 87 :mod:`email.charset`) or the name of a character set, which will be | 88 :mod:`email.charset`) or the name of a character set, which will be |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 :func:`decode_header`. | 165 :func:`decode_header`. |
| 165 | 166 |
| 166 :func:`decode_header` takes a header value string and returns a sequence of | 167 :func:`decode_header` takes a header value string and returns a sequence of |
| 167 pairs of the format ``(decoded_string, charset)`` where *charset* is the name
of | 168 pairs of the format ``(decoded_string, charset)`` where *charset* is the name
of |
| 168 the character set. | 169 the character set. |
| 169 | 170 |
| 170 This function takes one of those sequence of pairs and returns a :class:`Head
er` | 171 This function takes one of those sequence of pairs and returns a :class:`Head
er` |
| 171 instance. Optional *maxlinelen*, *header_name*, and *continuation_ws* are as
in | 172 instance. Optional *maxlinelen*, *header_name*, and *continuation_ws* are as
in |
| 172 the :class:`Header` constructor. | 173 the :class:`Header` constructor. |
| 173 | 174 |
| OLD | NEW |