diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-11-24 22:33:18 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-24 22:33:18 (GMT) |
commit | cda85a0d1ca217c927211af799072c85b04b4e89 (patch) | |
tree | 9c39c7db7dadb3f5845002a27f56fb74c74eed6a /Doc/library/urllib.parse.rst | |
parent | ed92910852ad7a3006bc264ef6cb061868e5a82c (diff) | |
download | cpython-cda85a0d1ca217c927211af799072c85b04b4e89.zip cpython-cda85a0d1ca217c927211af799072c85b04b4e89.tar.gz cpython-cda85a0d1ca217c927211af799072c85b04b4e89.tar.bz2 |
Issue #25576: Remove application/x-www-form-urlencoded charset advice
No charset parameter is standardized for this Content-Type value. Also
clarify that urlencode() outputs ASCII.
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r-- | Doc/library/urllib.parse.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index fbbabca..ac04f99 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -519,10 +519,11 @@ task isn't already covered by the URL parsing functions above. .. function:: urlencode(query, doseq=False, safe='', encoding=None, errors=None) Convert a mapping object or a sequence of two-element tuples, which may - contain :class:`str` or :class:`bytes` objects, to a "percent-encoded" - string. If the resultant string is to be used as a *data* for POST - operation with :func:`~urllib.request.urlopen` function, then it should be - properly encoded to bytes, otherwise it would result in a :exc:`TypeError`. + contain :class:`str` or :class:`bytes` objects, to a percent-encoded ASCII + text string. If the resultant string is to be used as a *data* for POST + operation with the :func:`~urllib.request.urlopen` function, then + it should be encoded to bytes, otherwise it would result in a + :exc:`TypeError`. The resulting string is a series of ``key=value`` pairs separated by ``'&'`` characters, where both *key* and *value* are quoted using :func:`quote_plus` |