Author vajrasky
Recipients LDTech, Mi.Zou, ezio.melotti, orsenthil, terry.reedy, vajrasky
Date 2013-07-18.10:29:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374143346.35.0.358310371371.issue17214@psf.upfronthosting.co.za>
In-reply-to
Content
The script for demonstrating bug can be simplified to:

-----------------------------------------------------------------------
import urllib.request
url = "http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-Käfer/order/date_desc"

req = urllib.request.Request(url)
response = urllib.request.urlopen(req, timeout=30)
the_page = response.read().decode('utf-8')
print(the_page)
-----------------------------------------------------------------------

Attached the simple patch to solve this problem.

The question is whether we should fix this problem in urllib or not because strictly speaking the url should be ascii characters only. But if the Firefox can open this url, why not urllib?

I will contemplate about this problem and if I (or other people) think that urllib should handle url containing non-ascii characters, then I will add additional unit test.

Until then, people can use third party package, which is
request package from http://docs.python-requests.org/en/latest/

----------------------------------------------------------------
r = requests.get("http://www.libon.it/ricerca/7817940/3499155443/dettaglio/3102314/Onkel-Oswald-und-der-Sudan-Käfer/order/date_desc")
print(r.text)
----------------------------------------------------------------
History
Date User Action Args
2013-07-18 10:29:06vajraskysetrecipients: + vajrasky, terry.reedy, orsenthil, ezio.melotti, Mi.Zou, LDTech
2013-07-18 10:29:06vajraskysetmessageid: <1374143346.35.0.358310371371.issue17214@psf.upfronthosting.co.za>
2013-07-18 10:29:06vajraskylinkissue17214 messages
2013-07-18 10:29:05vajraskycreate