This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mgiuca
Recipients mgiuca
Date 2009-05-26.16:15:21
SpamBayes Score 3.249359e-05
Marked as misclassified No
Message-id <1243354524.61.0.291164440748.issue6118@psf.upfronthosting.co.za>
In-reply-to
Content
urllib.parse.quote_plus will ignore its encoding and errors arguments if
its input string has a space in it.

Intended behaviour:
>>> urllib.parse.quote_plus("\xa2\xd8 \xff", encoding='latin-1')
'%A2%D8+%FF'
Observed behaviour:
>>> urllib.parse.quote_plus("\xa2\xd8 \xff", encoding='latin-1')
'%C2%A2%C3%98+%C3%BF'
(This just uses the default UTF-8 encoding).

Attached patch with test cases. This only affects Python 3.x (the 2.x
branch has no encoding/errors argument).
History
Date User Action Args
2009-05-26 16:15:24mgiucasetrecipients: + mgiuca
2009-05-26 16:15:24mgiucasetmessageid: <1243354524.61.0.291164440748.issue6118@psf.upfronthosting.co.za>
2009-05-26 16:15:23mgiucalinkissue6118 messages
2009-05-26 16:15:22mgiucacreate