Dmitry Tsirkov added the comment:
I have recently stumbled upon this bug, and I can present the example and a
solution I've used.
The issue happens when we try to parse x-www-form-urlencoded of type bytes:
```
>>> from urllib.parse import urlencode, parse_qs
>>> urlencode([('v', 'รถ')])
'v=%C3%B
Cheryl Sabella added the comment:
Would you be able to include an example for recreating this?
Looking at the code, it uses the ascii encoding for bytes (which can only
contain ASCII literal characters) and should not be using that encoding for
strings.
Thanks!
--
nosy: +cheryl.sab
New submission from Abhilash Raj:
After decoding percentage encoded `name` and `values` in the query string, it
tries to `_coerce_result` or encode the result to ascii (which is the value of
_implicit_encoding).
```
File "/usr/lib/python3.6/urllib/parse.py", line 691, in parse_qsl
value