dealing with special characters in Python and MySQL

Leo Kislov Leo.Kislov at gmail.com
Mon Dec 18 03:06:54 EST 2006


ronrsr wrote:
> > >
> >     Try putting "use_unicode=True" in the MySQLdb "connect" call.
>
> tried that, and also added charset="utf8" -
>
> now, I can't do any string operations, I get the error msg:
>
> descriptor 'lower' requires a 'str' object but received a 'unicode'
>       args = ("descriptor 'lower' requires a 'str' object but received
> a 'unicode'",)
>
>
> or similar, on every string operation.

What is string operation? Every time you say "I get error" please
provide source code where this error occurs. And by the way, do you
know that for non-ascii characters you should use unicode type, not str
type?

  -- Leo




More information about the Python-list mailing list