10 years ago, the article _mysql Chinese set

The following settings for GB2312,

Use GBK character set when creating a database 1

The DEFAULT DATABASE `orange` the CHARACTER the CREATE GBK the COLLATE gbk_chinese_ci the SET;
2 performs a" SET NAMES GB2312 "connected application

mysqlpp::Query query = conn->query(”SET NAMES GB2312″);
query.execute();
query.reset();
query.flush();

3 C / C ++ Project Options general / Character set option Use Multi-Byte Character Set

Guess you like

Origin www.cnblogs.com/hshy/p/10927771.html