Skip to content

Instantly share code, notes, and snippets.

@fra3il
Created March 9, 2015 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fra3il/0c9491c7e416538b116f to your computer and use it in GitHub Desktop.
Save fra3il/0c9491c7e416538b116f to your computer and use it in GitHub Desktop.
[Blog] latin1? utf8? - 2
import MySQLdb
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='test')
cu = conn.cursor()
cu.execute("set names utf8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment