0

I've seen this nice topic, but my question might be slightly different. Is it good practice to set your custom DB table (i.e. for plugin, which saves utf8 text) charset explicitly , like:

CREATE TABLE IF NOT EXISTS  (
   ...
)  DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci AUTO_INCREMENT=1"

or should we use the built-in detection method, like:

CREATE TABLE IF NOT EXISTS  (
   ...
) " . $wpdb->get_charset_collate() ." AUTO_INCREMENT=1"

What are cons and pros for each of one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.