New submission from Matt Giuca <matt.gi...@gmail.com>: 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). ---------- components: Library (Lib) files: urllib_quote_plus.patch keywords: patch messages: 88368 nosy: mgiuca severity: normal status: open title: urllib.parse.quote_plus ignores optional arguments type: behavior versions: Python 3.0, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file14081/urllib_quote_plus.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com