Python, MySQL, and Unicode

The top google result for the search terms mysql, python, and unicode is a blog post that recommends using the init_command option to the construct a MySQLdb connection to run the SQL 'SET NAMES utf8'. A better way is to set the charset option to 'utf8'. This way MySQLdb realizes the connection is using utf8 and encodes things properly. For more explanation see MySQLDB's user guide.

blog/python_mysql_and_unicode.txt · Last modified: 2010/01/31 19:00 by brian
Recent changes · Show pagesource · Login