I have a table like this, where one column is latin1, the other is UTF-8:
Create Table: CREATE TABLE `names` (
`name_english` varchar(255) character NOT NULL,
`name_chinese` varchar(255) character set utf8 default NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1
When I do an insert, I have to type _utf8
before values being inserted into UTF-8 columns:
insert into names (name_english = "hooey", name_chinese = _utf8 "鬼佬");
However, since MySQL should know that name_chinese
is a UTF-8 column, it should be able to know to use _utf8
automatically.
Is there any way to tell MySQL to use _utf8
automatically, so when I'm programatically making prepared statements, I don't have to worry about including it with the right parameters?