'Sniff out the character set in use for connection results.'

def _detect_charset(self, connection):

    try:
        cset_name = connection.connection.character_set_name
    except AttributeError:
        util.warn("No    'character_set_name'    can    be    detected    with    this    MySQL-Python    version;    please    upgrade    to    a    recent    version    of    MySQL-Python.        Assuming    latin1.")
        return 'latin1'
    else:
        return cset_name()
