0
4

3 回答 3

2

Set names to UTF8 before inserting into your database.

SET NAMES utf8

It sounds like your connection is using latin1 encoding. I struggled with the same thing for months.

http://forums.mysql.com/read.php?103,46870,47245

于 2013-02-27T05:40:53.167 回答
0

Check the encoding (collation) used on the database. Try changing it to utf8_general_ci or the equivalent choice on the Database you are using.

于 2013-02-27T05:26:10.827 回答
0

You need to set encoding to utf8 using method mysql_set_charset('utf8',$link);

<?php
$link = mysql_connect('localhost', 'user', 'password');
mysql_set_charset('utf8',$link);
$db_selected = mysql_select_db('your_db_name', $link); 
?>

And then the usual stuff you do with your connection

于 2013-02-27T05:42:24.893 回答