What follows is a collection of links that deal with common character set issues in MySQL setups.

https://wincent.com/wiki/Finding_out_the_encoding_of_a_MySQL_database
This short article desribes how to find out the current encoding settings of a MySQL database.

https://dev.mysql.com/doc/refman/5.5/en/charset-connection.html
This is the official documentation of character set manipulation in MySQL 5.5.

http://mysqldump.azundris.com/archives/60-Handling-character-sets.html
This article describes in detail how characters are represented in the database. Basically, it introduces how character encodings work.

By default, Python cannot deal with non-ASCII characters in source files, such as the following line:

re.sub("ae", u'ä', "haette")
# SyntaxError: Non-ASCII character '\xc3' in file <file>.py on line <line>, but no 
# encoding declared; see http://legacy.python.org/dev/peps/pep-0263/ for details

The file encoding can be signalized by adding a magic comment in either the first or second line of the file:

#!/usr/bin/bash
# -*- coding: utf-8 -*

 References

  • [1] More information in the Python Enhancement Proposals index