Hi Karen,

thanks for your reply

it means so far I must do a:
qs = search[query].encode('iso-8859-1')

before I add the qs to a Q object of a queryset. Only in this case I get
results.

the full codepart looks like:

decoder = simplejson.JSONDecoder()
search = decoder.decode(request.POST['search'])
qs = search['caption'].encode('iso-8859-1')

searchstr = urllib.unquote_plus(qs).strip('=!~')

basic.filter( Q(evid__caption__icontains=searchstr) )


I do have no DATABASE_OPTIONS set. Maybe that's it?


-- Hinnack


2009/11/25 Karen Tracey <kmtra...@gmail.com>

> On Tue, Nov 24, 2009 at 5:57 AM, Hinnack <henrik.gens...@googlemail.com>wrote:
>
>> Hi,
>>
>> I have django 1.1 and a mysql database created in utf-8.
>> My tables are also utf8 as the collation is, too.
>>
>> Showing data in a view works pretty well with german umlaute, but doing
>> a search with filter and icontains always returns an empty queryset...
>>
>> if I convert the search back to iso-8859 I get results...
>>
>> what am I doing wrong?
>>
>>
>>
> What does "convert the search back to iso-8859" mean?
>
> Karen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to