WAP 本地Opera8.0调试 汉字显示问题

jb2008 2005-09-17 09:58:29
我写了个WAP页面,test.asp如下
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Response.ContentType="text/vnd.wap.wml;charset=UTF-8" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" />
<meta http-equiv="Cache-Control" content="no-cache" />
</head>
<card id="index" title="WapSystem">
<p>
WapSystem
<br />
<a href="itemlist.asp?type=girl" title="确定">[图片下载]</a><br />
<a href="itemlist.asp?type=ring" title="确定">[铃声下载]</a><br />
<a href="itemlist.asp?type=formun" title="确定">[讨论区]</a><br />
</p>
</card>
</wml>

在本地IIS上浏览时出现乱码,但传到远程服务器上却显示正常。同样的页面。
还有,从Access数据库中读出的文字也显示正常,这是为什么?是不是我本地的IIS字符问题,
Opera 的 encoding 都是 auto selection.
...全文
215 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
叶子哟 2005-11-17
  • 打赏
  • 举报
回复
显示时全部unicode编码,万无一失
咏帆 2005-11-11
  • 打赏
  • 举报
回复

<a href="itemlist.asp?type=girl" title="确定">[<%=unicode("图片下载")%>]</a><br />

'字符串编码转换函数gb->unicode
function unicode(str)
dim i,j,c,i1,i2,u,fs,f,p
unicode=""
p=""
for i=1 to len(str)
c=mid(str,i,1)
j=ascw(c)
if j<0 then
j=j+65536
end if
if j>=0 and j<=128 then
if p="c" then
unicode=" "&unicode
p="e"
end if
unicode=unicode&c
else
if p="e" then
unicode=unicode&" "
p="c"
end if
unicode=unicode&"&#"&j&";"
end if
next
end function
kaixin110 2005-11-10
  • 打赏
  • 举报
回复
UTF-8
SK猫 2005-10-11
  • 打赏
  • 举报
回复
格式没错,估计头2行有问题,你试试把第二行删除,在你本机试试,如果正常的话,可能就是你本机的MINE设置有问题

790

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 其他移动相关
社区管理员
  • 移动开发其他问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧