mfares / solrpy

Automatically exported from code.google.com/p/solrpy
0 stars 0 forks source link

raw_query turns params into unicode, but urllib in python 2.x doesn't actually handle it #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
raw_query() turns all it's parameters into unicode objects, and then calls 
urllib.urlencode(), which can't really handle unicode in python 2.x, so it 
just turns non-ascii into ?'s. This makes it impossible to hand non-ascii to 
solr queries. If you encode to utf-8 before passing it to raw_query, the 
unicode() constructor throws an exception.

query() doesn't do this to its extra parameters, so to me it seems that 
raw_query shouldn't either. Patch attached.

Original issue reported on code.google.com by realy...@gmail.com on 19 Jan 2010 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
Applied in r54 (thanks!)

Original comment by ed.summers on 7 Feb 2010 at 9:19

GoogleCodeExporter commented 8 years ago

Original comment by ed.summers on 7 Feb 2010 at 9:28