public function setUtf8unicode() {
	
		$this->openConnection();
		
		try {
			
			$this->handler->exec('SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci');
	
			$this->handler->exec(
				'SET character_set_client = "utf8mb4", character_set_connection = "utf8mb4",' . 
				' character_set_database = "utf8mb4", character_set_results = "utf8mb4",' .
				' character_set_server = "utf8mb4", collation_connection = "utf8mb4_unicode_ci",' .
				' collation_database = "utf8mb4_unicode_ci", collation_server = "utf8mb4_unicode_ci"');
		
		} catch (\Exception $e) {
			
			// cannot log right now
			
		}
			
		
	}
public function setUtf8unicode() {
	
		$this->openConnection();
		
		try {
			
			$this->handler->exec('SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci');
	
			$this->handler->exec(
				'SET character_set_client = "utf8mb4", character_set_connection = "utf8mb4",' . 
				' character_set_database = "utf8mb4", character_set_results = "utf8mb4",' .
				' character_set_server = "utf8mb4", collation_connection = "utf8mb4_unicode_ci",' .
				' collation_database = "utf8mb4_unicode_ci", collation_server = "utf8mb4_unicode_ci"');
		
		} catch (\Exception $e) {
			
			// cannot log right now
			
		}
			
		
	}
public function setUtf8unicode ( ) { $ this -> openConnection ( ) ; try { $ this -> handler -> exec ( 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci' ) ; $ this -> handler -> exec ( 'SET character_set_client = "utf8mb4", character_set_connection = "utf8mb4",' . ' character_set_database = "utf8mb4", character_set_results = "utf8mb4",' . ' character_set_server = "utf8mb4", collation_connection = "utf8mb4_unicode_ci",' . ' collation_database = "utf8mb4_unicode_ci", collation_server = "utf8mb4_unicode_ci"' ) ; } catch ( \ Exception $ e ) { // cannot log right now
 } }
Set MySQL connection as UTF8mb4 and collation as utf8mb4_unicode_ci, useful to
support extended unicode like Emoji.
Set MySQL connection as UTF8mb4 and collation as utf8mb4_unicode_ci useful to support extended unicode like Emoji .