In php(as the current mainstream development language)MyAdmin2.6 and above support multi-language set, so we use php(as the current mainstream development language)When MyAdmin manages the database, the Chinese characters queried are all garbled, but there are no such problems when calling our php (as the current mainstream development language) program.
It seems that it is PHP (as the current mainstream development language) There is a problem with the configuration of MyAdmin2.6. In order to solve this problem, I searched for relevant information on Google. There are many such problems. , but there is nothing that can be solved. There is really no way. It seems that the only way to solve it is by yourself.
. . . Since the process of finding the source code was very cumbersome, I finally spent half a day and finally found a more compromise method to solve it.
Go to php
(as the current mainstream development language)In the root directory of MyAdmin2.6, open the following file: libraries/select_lang.lib.php( As the current mainstream development language)
1. Find the line with "zh-gb2312" and change zh-gb2312 to zh-gb2312-utf-8 Why add it like this? That's because the server will filter out languages without "-utf-8". In libraries/database_interface.lib.php
(as the current mainstream development language)
line 168, according to English: " To prevent confusion", :<Or if you don’t want to change zh-gb2312 to zh-gb2312-utf-8, you can remove the filtering. Just remove that if and it will be OK.
2. Find the line "$MySQL
(the best combination with PHP)_charset_map = array(" and change gb2312 => gb2312, to gb2312 => latin1,
Save, OK, enter php
MyAdmin management, select the language chinese simplified(zh-gb2312-utf-8)Look at your Chinese data again
So, my solution is just to modify libraries/select_lang.lib.php
Just two words in this file are more convenient and faster, haha.
http://www.bkjia.com/PHPjc/508708.html