To make sure you use utf-8 on inserts, specify in the database connection.

!!! Python

!! MySQL

%%prettify 
{{{
import MySQLdb
conn = MySQLdb.connect(user='root', passwd='', db='test', 
    use_unicode=True, 
    charset='utf8')
}}}
/%

----
[Python | CategoryComputing.Lang.Python] - [MySQL | CategoryComputing.DB.SQL.MySQL]