original_string: public function set_charset($charset)
  	{
  		// Make sure the database is connected
  		$this->_connection or $this->connect();
  
  		// Set Charset for SQL Server connection
  		if (strtolower($this->driver_name()) == 'sqlsrv')
  		{
  			$this->_connection->setAttribute(\PDO::SQLSRV_ATTR_ENCODING, \PDO::SQLSRV_ENCODING_SYSTEM);
  		}
  		// Set Charset for SQLite connection
  		elseif (strtolower($this->driver_name()) == 'sqlite')
  		{
  			// Execute a raw PRAGMA encoding query
  			$this->_connection->exec('PRAGMA encoding = ' . $this->quote($charset));
  		}
  		// Set Charset for any connection except ODBC, as it throws exception
  		elseif (strtolower($this->driver_name()) != 'odbc')
  		{
  			// Execute a raw SET NAMES query
  			$this->_connection->exec('SET NAMES '.$this->quote($charset));
  		}
  	}
code: public function set_charset($charset)
  	{
  		// Make sure the database is connected
  		$this->_connection or $this->connect();
  
  		// Set Charset for SQL Server connection
  		if (strtolower($this->driver_name()) == 'sqlsrv')
  		{
  			$this->_connection->setAttribute(\PDO::SQLSRV_ATTR_ENCODING, \PDO::SQLSRV_ENCODING_SYSTEM);
  		}
  		// Set Charset for SQLite connection
  		elseif (strtolower($this->driver_name()) == 'sqlite')
  		{
  			// Execute a raw PRAGMA encoding query
  			$this->_connection->exec('PRAGMA encoding = ' . $this->quote($charset));
  		}
  		// Set Charset for any connection except ODBC, as it throws exception
  		elseif (strtolower($this->driver_name()) != 'odbc')
  		{
  			// Execute a raw SET NAMES query
  			$this->_connection->exec('SET NAMES '.$this->quote($charset));
  		}
  	}
code_tokens: public function set_charset ( $ charset ) { // Make sure the database is connected $ this -> _connection or $ this -> connect ( ) ; // Set Charset for SQL Server connection if ( strtolower ( $ this -> driver_name ( ) ) == 'sqlsrv' ) { $ this -> _connection -> setAttribute ( \ PDO :: SQLSRV_ATTR_ENCODING , \ PDO :: SQLSRV_ENCODING_SYSTEM ) ; } // Set Charset for SQLite connection elseif ( strtolower ( $ this -> driver_name ( ) ) == 'sqlite' ) { // Execute a raw PRAGMA encoding query $ this -> _connection -> exec ( 'PRAGMA encoding = ' . $ this -> quote ( $ charset ) ) ; } // Set Charset for any connection except ODBC, as it throws exception elseif ( strtolower ( $ this -> driver_name ( ) ) != 'odbc' ) { // Execute a raw SET NAMES query $ this -> _connection -> exec ( 'SET NAMES ' . $ this -> quote ( $ charset ) ) ; } }
docstring: Set the charset
  
  @param string $charset
docstring_tokens: Set the charset