+ $charset_collate = $this->determine_charset( $charset, $collate );
+
+ $this->charset = $charset_collate['charset'];
+ $this->collate = $charset_collate['collate'];
+ }
+
+ /**
+ * Determines the best charset and collation to use given a charset and collation.
+ *
+ * For example, when able, utf8mb4 should be used instead of utf8.
+ *
+ * @since 4.6.0
+ * @access public
+ *
+ * @param string $charset The character set to check.
+ * @param string $collate The collation to check.
+ * @return array The most appropriate character set and collation to use.
+ */
+ public function determine_charset( $charset, $collate ) {