日期:2014-05-16  浏览次数:20812 次

2天未处理问题,待达人
SQL code


CREATE TABLE `tb_qz_source_daoru` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `source` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=gb2312


show full columns from tb_qz_source_daoru;

Field    Type                   Collation    Null    Key    Default    Extra    Privileges    Comment
id       int(11)                       NO       PRI        auto_increment    select,insert,update,references    ""
create_time    timestamp               YES    ""    CURRENT_TIMESTAMP    ""    select,insert,update,references    ""
source    varchar(200)             gb2312_chinese_ci    YES    ""        ""    select,insert,update,references    ""


show variables like 'char%';


Variable_name    Value
character_set_client    utf8
character_set_connection    utf8
character_set_database    gb2312
character_set_filesystem    binary
character_set_results    utf8
character_set_server    gb2312
character_set_system    utf8
character_sets_dir    D:\wamp\mysql5.1\share\charsets\


insert into tb_qz_source_daoru(source) select '查看英才简··历库简历|' ;
  Incorrect string value: '\xC2\xB7\xC2\xB7\xE5\x8E...' for column 'source' at row 1
----如果屏蔽中文特殊字符:键盘左上角ESC挨着的中文键。




------解决方案--------------------
你的default-character-set=utf8要在
[mysql]下才行
------解决方案--------------------
你先执行一下 set names 'gbk'; 然后再执行你的语句。

触发器中则需要单独指定一下字符集参考下贴中的操作。

http://blog.csdn.net/ACMAIN_CHM/archive/2009/05/12/4174186.aspx
MySQL 中文显示乱码