0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00

Correct misspellings of ISO-8859

This commit is contained in:
Martin Panter 2016-08-10 05:25:16 +00:00
parent 4199bbaf63
commit 540f0451d2
4 changed files with 6 additions and 6 deletions

View File

@ -227,12 +227,12 @@ HTTPConnection Objects
If *body* is specified, the specified data is sent after the headers are
finished. It may be a string, a :term:`bytes-like object`, an open
:term:`file object`, or an iterable of :term:`bytes-like object`\s. If
*body* is a string, it is encoded as ISO-8851-1, the default for HTTP. If
*body* is a string, it is encoded as ISO-8859-1, the default for HTTP. If
it is a bytes-like object the bytes are sent as is. If it is a :term:`file
object`, the contents of the file is sent; this file object should support
at least the ``read()`` method. If the file object has a ``mode``
attribute, the data returned by the ``read()`` method will be encoded as
ISO-8851-1 unless the ``mode`` attribute contains the substring ``b``,
ISO-8859-1 unless the ``mode`` attribute contains the substring ``b``,
otherwise the data returned by ``read()`` is sent as is. If *body* is an
iterable, the elements of the iterable are sent as is until the iterable is
exhausted.

View File

@ -103,7 +103,7 @@ def decode(string):
"""Decode a raw base64 string, returning a bytes object.
This function does not parse a full MIME header value encoded with
base64 (like =?iso-8895-1?b?bmloISBuaWgh?=) -- please use the high
base64 (like =?iso-8859-1?b?bmloISBuaWgh?=) -- please use the high
level email.header class for that functionality.
"""
if not string:

View File

@ -292,7 +292,7 @@ def header_decode(s):
"""Decode a string encoded with RFC 2045 MIME header `Q' encoding.
This function does not parse a full MIME header value encoded with
quoted-printable (like =?iso-8895-1?q?Hello_World?=) -- please use
quoted-printable (like =?iso-8859-1?q?Hello_World?=) -- please use
the high level email.header class for that functionality.
"""
s = s.replace('_', ' ')

View File

@ -2302,9 +2302,9 @@ Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?=
def test_rfc2047_Q_invalid_digits(self):
# issue 10004.
s = '=?iso-8659-1?Q?andr=e9=zz?='
s = '=?iso-8859-1?Q?andr=e9=zz?='
self.assertEqual(decode_header(s),
[(b'andr\xe9=zz', 'iso-8659-1')])
[(b'andr\xe9=zz', 'iso-8859-1')])
def test_rfc2047_rfc2047_1(self):
# 1st testcase at end of rfc2047