If you wanted to use UTF-8 as the default character set, you would specify the option default-character-set=utf8 in the [mysqld] section of the my.ini or my.cnf file. You would need to do this before loading data into any tables. However, I don't see UTF-8 in the character sets directory in my MySQL 4.0.13 installation. You would probably need version 4.1, which is still in the alpha phase.
MySQL 4.1 also allows you to specify character sets for individual databases, tables, and fields, for example:[tt]
CREATE DATABASE db CHARACTER SET utf8;
CREATE TABLE t1
(
id INT,
name CHAR(10)
)
CHARACTER SET utf8;
CREATE TABLE t2
(
id INT,
name CHAR(10) CHARACTER SET utf8
);[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.