November 24, 2010
How to insert chinese character in mysql table?
Question by user319198
I want to save data in Chinese language in mysql table.
Can anyone tell me what settings I have to do for it in mysql and PHP.
My table will save data in both English and Chinese some column English other Chinese . Is it possible with single table.
Any help will be appreciated.
Answer by Guixing Bai
Use UTF-8 when you create table
create table xxx ()CHARACTER SET = utf8;
Use UTF-8 when you insert to table
set names utf8; insert into xxx (xx,x);
Answer by Starx
Set the character set to UTF-8, in mysql.
Check this for reference
http://confluence.jetbrains.net/display/TCD/Configuring+UTF8+Character+Set+for+MySQL
http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html