header("Content-type:text/html;charset=gb2312");
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
都要有,建议使用UTF-8的编码
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
都要有,建议使用UTF-8的编码
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 和iconv("utf-8","gbk",$content)
都用过了
不行
统一用utf-8很麻烦在xp系统就正常在linux中乱码
//把text/xml改为楼主的类型。
overrideMimeType("text/xml;charset=gb2312");//这个只有Firefox支持,所以楼主要兼容IE,要判断一下
setRequestHeader("Content-Type","text/xml;charset=gb2312");
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp=false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp=new XMLHttpRequest();
}
function CallServer()
{
var UserID=document.getElementById("UserID").value;
UserID = encodeURI(UserID);
UserID = encodeURI(UserID);
if (UserID.value!="")
{
var url ="yanzhengauthcode.php?UserID="+UserID;
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=UpdateData;xmlHttp.send(null);
alert(xmlhttp.getAllResponseHeaders());
alert(xmlhttp.getResponseHeader("Content-Type")); //
document.frmTest.myButton.disabled = true;
xmlhttp.setRequestHeader("Content-Type","text/xml;charset=gb2312")
alert(xmlhttp.setRequestHeader("Content-Type","text/xml;charset=gb2312"));
}else
{
alert("请您填写用户名!");
}}function UpdateData()
{ if(xmlHttp.readyState<4)
{
span.innerHTML="loading...";
}
if(xmlHttp.readyState==4)
{
document.getElementById("span").innerHTML=xmlHttp.responseText;
document.getElementById("User").value=xmlHttp.responseText;
document.getElementById("imgid").innerHTML="";
}
}
用软件一次过把档案转换编码成utf-8
再一次过把档案内的gb2312字全部取代成utf-8
数据库导出,转换编码成utf-8,再导入...
完成 =_=||网站如果不是超巨大的话...30分钟就很够了
看只能用yctin 的方法了