mysql导出表为xls格式中文乱码的处理


导出时候增加参数:character set gbk,解决中文乱码

show create table zentao.zt_user;
......
  `clientStatus` enum('online','away','busy','offline') NOT NULL DEFAULT 'offline',
  `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account` (`account`),
  KEY `dept` (`dept`),
  KEY `email` (`email`),
  KEY `commiter` (`commiter`)
) ENGINE=MyISAM AUTO_INCREMENT=119 DEFAULT CHARSET=utf8 |

select * from zentao.zt_user into outfile './zt_user.xls' character set gbk;

禅道:https://www.zentao.net/ask/3595.html

声明:鹅石壳儿|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - mysql导出表为xls格式中文乱码的处理


Carpe Diem and Do what I like