public function set_charset($charset = 'utf8', $collation = 'utf8_general_ci') {

        // do not show the warning that this method has not been called
        unset($this->warnings['charset']);

        // set MySQL character set
        $this->query('SET NAMES "' . $this->escape($charset) . '" COLLATE "' . $this->escape($collation) . '"');

    }