﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3387	UnicodeEncodeError on contains and icontains	Gacha	Adrian Holovaty	"I got UnicodeEncodeError when I try to search with ""__icontains"" and unicode string.

{{{
In [26]: Product.objects.filter(name=unicode('Fantasia - ķiršu','utf-8'))
Out[26]: [<Product: Fantasia - ķiršu>]

In [27]: Product.objects.filter(name__icontains=unicode('Fantasia - ķiršu','utf-8'))
---------------------------------------------------------------------------
exceptions.UnicodeEncodeError                        Traceback (most recent call last)
............
/home/***/django/db/models/fields/__init__.py in <lambda>(x)
     23
     24 # prepares a value for use in a LIKE query
---> 25 prep_for_like_query = lambda x: str(x).replace(""\\"", ""\\\\"").replace(""%"", ""\%"").replace(""_"", ""\_"")
     26
     27 # returns the <ul> class for a given radio_admin value

UnicodeEncodeError: 'ascii' codec can't encode character u'\u0137' in position 11: ordinal not in range(128)
}}}"		closed	Core (Other)	dev		worksforme	UnicodeEncodeError		Unreviewed	1	0	1	1	0	0
