首页 > 代码库 > 插入失败,错误提示:Incorrect string value: '\xB1\xEA\xCC\xE2' for column 'title' at row 1

插入失败,错误提示:Incorrect string value: '\xB1\xEA\xCC\xE2' for column 'title' at row 1

PHP解决乱码问题只需在连接后加入mysql_query("set names ‘gbk‘") 就OK!
如: $conn = mysql_connect("localhost","root","");
  mysql_query("set names ‘gbk‘");

插入失败,错误提示:Incorrect string value: '\xB1\xEA\xCC\xE2' for column 'title' at row 1