In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "mysql CAPI interface reading Chinese garbled code problem how to solve", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "mysql CAPI interface read Chinese garbled problem how to solve" it!
In the recent yymysqlsdk open source project, the support for Chinese is not in place, so it took 1.5 days to analyze the situation of Chinese processing.
1. First confirm your mysql configuration file, my.ini (for configuration only). If not, add it.
[client]
Default-character-set=gbk (for the support of Chinese when developing client programs; if it is set to utf8 here, I have not verified it, and verify it later, )
[mysql]
Default-character-set=utf8
[mysqld]
Default-character-set=utf8
two。 Encoding attribute, select utf8, I am using naticat.
3. For tables, right-click to query the table information-"ddl, do you see a" ENGINE=InnoDB DEFAULT CHARSET=latin1; "?
By the way, this is the default encoding method used by naticat when designing the table. Please do not change this encoding method with the video. Latin1 is compatible with utf8 support (wild guess).
4. Then it is time to use vc to develop the client program. After real_connect, please execute the encoding setting, mysql_query (xxx, "set names latin1")
5. Look at the code.
View plain
Int rows = mysql_num_rows (res)
Int fields = mysql_num_fields (res)
For (int iTuno Bandi)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.