Monday, June 20, 2011

Incorrect string value Error in MySQL


When I typed following SQL command for Chinese input:
use cesei_cn;
INSERT INTO cesei_committee VALUES (1,'¹ËÎÊ','Advisor_Board.php');
It is returned with an error message:
Error 1366 (HY000) at line 2: Incorrect string value '\xB9\xCB\xCE\xCA' for 'committee_name' at row 1
This is due to the limitation of utf8
To fix this program, go to
C:\Program File\MySQL\MySQL Server 5.0\my.ini
change
default-character-set=utf-8
to
default-character-set=latin1
Restart MySQL service

No comments:

Post a Comment