    def cursor(self):
        # ...
        #
        # OLD code:
        # if DEBUG:
        #    return base.CursorDebugWrapper(MysqlDebugWrapper(self.connection.cursor()), self)
        #return self.connection.cursor()
        
        # NEW code:
        if self.connection.get_server_info() >= '4.1':
            cursor = self.connection.cursor()
            cursor.execute("SET NAMES utf8")
            if DEBUG:
                return base.CursorDebugWrapper(MysqlDebugWrapper(cursor), self)
        return cursor    