咨询下网页编码utf-8和gb2312的在IE中出现的问题。

MiSenIn 2010-10-11 11:31:57
我的问题 在IE 8 中出现问题。在火狐中一切正常


页面代码主要是下面的所示(down.html):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>测试标题中文 test title english</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>

<body>
测试内容中文 test content english
</body>
</html>




我们都知道 一个网页文件 编码需要在2个地方 设置:

网页里面 <meta http-equiv="Content-Type" content="text/html; charset=编码方式" />

保存文件的时候的 文件编码: ANSI、UTF-8、UTF-8 + bom 主要这三种。



现在我们拿3个页面来测试down1.html、down2.html、down3.html
【文件编码+网页内容编码】
down1.html 【ANSI + GB2312】
down2.html 【UTF-8 + utf-8】
down3.html 【UTF-8 +Bom + utf-8】


我发现出问题了
down1.html 正常,但是不能显示标题中的中文
down2.html 不正常,必须手工 右键选择网页编码格式
down3.html 不正常,必须手工 右键选择网页编码格式



...全文
119 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
写景 2010-10-11
  • 打赏
  • 举报
回复
【UTF-8 + utf-8】


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>测试标题中文 test title english</title>
</head>
<body>
测试内容中文 test content english
</body>
</html>

MiSenIn 2010-10-11
  • 打赏
  • 举报
回复
请教 怎么解决问题啊 你们会吗??
phuai007 2010-10-11
  • 打赏
  • 举报
回复
utf-8+UTF-8一切正常,ie8
Rockass 2010-10-11
  • 打赏
  • 举报
回复
同求,为啥

61,125

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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