Python with MySQL special characters


Some days ago a friend of mine who is learning python asked for my help.
When I looked at the code, I saw he was connecting to MySQL using MySQLdb connect function as in:
import MySQLdb as mdb
con = mdb.connect(host='localhost',user='myuser',passwd='mypassword',db='mydatabase')
And he was astonished because I was able to solve his problems just by changing that to:
import MySQLdb as mdb
con = mdb.connect(host='localhost',user='myuser',passwd='mypassword',db='mydatabase', charset='utf8', use_unicode=False)
Read More : 
http://e-solutionsgroups.blogspot.com/2015/06/python-web-framework.html

0 comments :