mysql and utf8
-
I created a plugin recently, which was based on another plugin. The plugin creates a database table like this.
$sql = “CREATE TABLE
" . $wpdb->prefix . "Quotes
(id
MEDIUMINT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY,quote
TEXT NULL);”;
dbDelta($sql);i got a support request that said:
“
it cant work with UTF8 names and contents…
create table like this:
PRIMARY KEY (IDD),
UNIQUE KEY IDD (IDD)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;
“
first, i thought the default was utf8.second, i’m a bit unclear on this topic. i’ve read the details of what utf8 is, but not clear on the big picture. i guess the user wants to use the plugin using a non-English language? Can somebody explain/point out a good resource?
thanks
- The topic ‘mysql and utf8’ is closed to new replies.