Home >Database >Mysql Tutorial >asp+mysql+utf8 网页出现乱码问题的解决方法_MySQL

asp+mysql+utf8 网页出现乱码问题的解决方法_MySQL

WBOY
WBOYOriginal
2016-06-01 13:18:111076browse

bitsCN.com MYSQL是UTF8编码,但无论在网页中加多少UTF8的定义,显示的结果都还是会有一些小格子,而且SQL语句中用LIKE 中文,也查询不出来。反而定义为gb2312,显示完全正常。

conn.asp 网页顶部写



Set conn = CreateObject("ADODB.Connection")
连接语句加入 DRIVER={MYSQL ODBC 3.51 Driver};database=…………CharSet=gb2312;
conn.Execute "SET NAMES gb2312;"

网页



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn