On 11/7/05, stan8688 <[EMAIL PROTECTED]> wrote:
> def index(request):
>     catus_list = polls.get_list(categoryuse_contains = u'\u64df')
>
> It does error when run. Why? thanks.

That's happening because psycopg, the underlying library, expects
parameters to be normal Python strings -- not Unicode strings. Cast
your Unicode string as a normal Python string, and the problem should
be solved.

polls.get_list(categoryuse_contains = u'\u64df'.encode('utf8'))

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to