MySQLdb and Unicode
deelan
ggg at zzz.it
Fri May 20 03:53:43 EDT 2005
Achim Domma (Procoders) wrote:
> Hi,
>
> I try to write unicode strings to a MySQL database via MySQLdb.
> According to the documentation I should pass 'utf-8' as keyword
> parameter to the connect method. But then I get the following error:
>
(...)
>
>
> I'm using version 1.2 of MySQLdb. Any hint what I'm doing wrong?
this is changed in 1.2, from the Connection class docstring:
"use_unicode"
''If True, text-like columns are returned as unicode objects
using the connection's character set. Otherwise, text-like
columns are returned as strings. columns are returned as
normal strings. Unicode objects will always be encoded to
the connection's character set regardless of this setting.''
--
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#me> a foaf:Person ; foaf:nick "deelan" ;
foaf:weblog <http://blog.deelan.com/> .
More information about the Python-list
mailing list