[GCC 3.4.3 20050227 (Red Hat 3.4.3-22.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> c = MySQLdb.connect(host = '127.0.0.1', db = 'taerbe', user = 'systt', passwd = '123456', use_unicode = True)
>>> c.cursor().execute("insert into taerbe.log (log_content) values ('文字')")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "MySQLdb/cursors.py", line 146, in execute
query = query.encode(charset)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb4 in position 130: ordinal not in range(1 2 8 )