| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 648 人关注过本帖
标题:[求助]字体为UTF-8网站中%和一些特殊符号
只看楼主 加入收藏
bestmayli
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2007-6-14
收藏
 问题点数:0 回复次数:2 
[求助]字体为UTF-8网站中%和一些特殊符号

我的网页用的是UTF-8字体,这个字体好像没有“%”,spec原来数据中有"%",后来我点更新网页"update",“%”就不见了,还有spec摄氏温度“℃”也变成乱码,如何才能保持这些符号的正确显示呢!谢谢大家


chg.asp代码:

<!--#include file=sqlopen.txt-->

<script language="JavaScript">
function CheckChamberNew()
{
if (document.ChamberNew.ID.value.length==0)
{
alert("Please input ID");
document.ChamberNew.ID.focus;
return false;
}
if (document.ChamberNew.ID.value.length>9)
{
alert("Equipment ID should be less than 9 letters!");
document.ChamberNew.ID.focus;
return false;
}
if (document.ChamberNew.Spec.value.length==0)
{
alert("please input Spec");
document.ChamberNew.Spec.focus;
return false;
}

if (document.ChamberNew.Model.value.length==0)
{
alert("please input Model");
document.ChamberNew.Model.focus;
return false;
}
if (document.ChamberNew.Size.value.length==0)
{
alert("Please input Size");
document.ChamberNew.Size.focus;
return false;
}
if (document.ChamberNew.Status.value.length==0)
{
alert("Please input Status");
document.ChamberNew.Status.focus;
return false;
}

if (document.ChamberNew.ChkTime.value.length==0)
{
alert("Please input latest Checkout Time!");
document.ChamberNew.ChkTime.focus;
return false;
}
if (document.ChamberNew.Manual.value.length==0)
{
alert("Please upload Manual!");
document.ChamberNew.Manual.focus;
return false;
}
return true;
}
</script>

<%

No=request.queryString("No")
ID=request.queryString("ID")
Spec=request.queryString("Spec")
Model=request.queryString("Model")
Size=request.queryString("Size")
status=request.queryString("Status")
ChkTime=request.queryString("ChkTime")
Manual=request.queryString("Manual")

%>

<br>

<form name="Chamber" method="post" action="EVEquipmentChgChk.asp" onSubmit="return CheckChamber();">
<table align="center">
<tr ><td align="left" bgcolor="#EFEF67" >Update Equipment Information</td></tr>
</table>
<br>
<table width="250" border="0" bordercolorlight="#FFFFFF" bgcolor="#EFEFEF" cellpadding="1" cellspacing="1" align="center">
<input type="hidden" name="No" size="20" value="<%=request.querystring("No")%>">
<tr >
<td align="right" bgcolor="#EFEFEF" >ID:</td>
<td bgcolor="#FFFFFF" align="left">
<input type="text" name="ID" size="20" value=<%=ID%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Spec:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Spec" size="20" value=<%=Spec%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Model:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Model" size="20" value=<%=Model%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Size:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Size" size="20" value=<%=Size%>>
</td>
</tr>

<tr>
<td align="right" bgcolor="#EFEFEF" >Status:</td>
<td bgcolor="#FFFFFF">
<select name="Status">
<option value=<%=status%>><%=status%></option>

<option value=Idel>Idel</option>
<option value=Repair>Repair</option>
<option value=CheckOut>CheckOut</option>
<option value=Reject>Reject</option>
<option value=Using>Using</option>

</select>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >ChkTime:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="ChkTime" size="20" value=<%=ChkTime%>>
</td>
</tr>
<tr>
<td align="right" bgcolor="#EFEFEF" >Remark:</td>
<td bgcolor="#FFFFFF">
<textarea name="Remark"><%=Remark%></textarea>
</td>
</tr>
<tr>
<td align="right" bgcolor="#EFEFEF" >Manual:</td>
<td bgcolor="#FFFFFF">
<textarea name="Manual"><%=Manual%></textarea>
</td>
</tr>




<tr align="center" >
<td colspan="2" bgcolor="#FFFFFF">
<input type="submit" name="Submit" value="Submit">&nbsp; <input type="reset" name="Submit2" value="reset">&nbsp;&nbsp;<input TYPE="button" VALUE="return" ONCLICK="history.back(-1)">
</td>
</tr>

</table>
</form>
chgchk.asp:
<!--#include file=sqlopen.txt-->
<%
EVNo=trim(request.form("EVNo"))
ID=trim(request.form("ID"))
Spec=trim(request.form("Spec"))
Model=trim(request.form("Model"))
EVSize=trim(request.form("EVSize"))
Status=trim(request.form("Status"))
ChkTime=trim(request.form("ChkTime"))
Manual=trim(request.form("Manual"))
Set rsChamber = Server.CreateObject("ADODB.Recordset")
SqlChamber="select top 1 * from EVEquipmentInfo where EVNo="&EVNo
rsChamber.Open SqlChamber,conn,1,3

rsChamber("ID")=ID
rsChamber("Spec")=Spec
rsChamber("Model")=Model
rsChamber("EVSize")=EVSize
rsChamber("Status")=Status
rsChamber("ChkTime")=ChkTime
rsChamber("Manual")=Manual
rsChamber.update
response.write"<script language=javascript>"
response.write"alert(""Update Success!"")"
response.write"</script>"
response.redirect("EVEquipmentupdate.asp")
rsChamber.close
set rsChamber=nothing
Conn.close
set Conn=nothing
%>,

[此贴子已经被作者于2007-8-8 16:40:15编辑过]

搜索更多相关主题的帖子: 字体 符号 
2007-08-08 16:34
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
改成gb2312可行吗?
2007-08-08 17:03
bestmayli
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2007-6-14
收藏
得分:0 
我整个系统都是UTF-8,是英语系统。要改的话,甚是麻烦。听说用replace,可是如何用replace呢?

2007-08-09 08:37
快速回复:[求助]字体为UTF-8网站中%和一些特殊符号
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025416 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved