字符集使用 [英] character set to use

查看:61
本文介绍了字符集使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于xhtml validatin,这是用于英语的正确元标记

还是可以忘记这个标签?

< meta http-equiv ="的Content-Type"含量=" text / html的;字符集= UTF-8英寸/>


< meta http-equiv =" Content-Type"含量=" text / html的;字符集= ISO-8859-1" />


谢谢,CMA

解决方案

CMAR写道:

对于xhtml validatin,这是用于英语
语言的正确metatag还是可以忘记这个标签?


字符集应该是您保存文件的内容。

内容类型应为application / xhtml + xml,而不是text / html - 请参阅
http://hixie.ch/advocacy/xhtml

< meta http-equiv =" Content-Type"含量=" text / html的;字符集= UTF-8英寸/>

< meta http-equiv =" Content-Type"含量=" text / html的;字符集= ISO-8859-1" />




< meta>不推荐:
http://www.htmlhelp。 com / tools / validator / charset.html

-

David Dorward< http://blog.dorward.me.uk /> < http://dorward.me.uk/>


在2004年5月2日的Sun上,CMAR写道:

对于xhtml validatin,这是用于英语的正确元数据




你已经提出了比你意识到的更多的问题。


原则上,字符编码和语言在(X)HTML中完全相互独立。


一些选择适当的建议字符编码可以在我的页面上看到
http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist

实际上,在当前的WWW环境中,它是'不建议使用

XHTML(而不是HTML),除非你明白为什么

你想要使用它。 HTML.4.01与部署的

用户代理(浏览器等)更加兼容。


XHTML中的字符编码与meta无关;标签。

它们仅与XHTML / 1.0的兼容性要求相关

附录C.


指定字符编码真正的HTTP头,而不是这个ersatz元中的
... http-equiv,最好,从理论上的b
来看,以及总的来说,实际问题,虽然有些

的人抱怨说,当文件被保存到文件中时它没有结转。


如果你发送内容

作为text / html,并且有许多缺点,使用XHTML几乎没有什么好处。


此外,目前,

UA市场的大多数(超过90%)无法正确呈现真实的XHTML内容,因为

text / xml(或其他XML MIME类型)。

这是我从阅读你提供的两个链接得到的要点。

所以道德似乎是我犯了一个错误改造和验证

我的页面为XHTML。


回到绘图板。或者将其作为经过验证的xhtml保留,而不是

字符集< meta>标签?


For xhtml validatin, which is the right metatag to use for English language
or can one forget about this tag?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Thanks, CMA

解决方案

CMAR wrote:

For xhtml validatin, which is the right metatag to use for English
language or can one forget about this tag?
The character set should be whatever you save the file in.
The content type should be application/xhtml+xml, not text/html - see
http://hixie.ch/advocacy/xhtml
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />



<meta> is not recommended:
http://www.htmlhelp.com/tools/validator/charset.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>


On Sun, 2 May 2004, CMAR wrote:

For xhtml validatin, which is the right metatag to use for English language



You''ve begged more questions than you realise.

Character coding and language are, in principle, completely
independent of each other in (X)HTML.

Some recommendations for choice of appropriate character coding can be
seen on my page http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist

In practice, in the current WWW context, it''s not advisable to use
XHTML (as opposed to HTML) unless and until you understand clearly why
you want to use it. HTML.4.01 is more compatible with the deployed
user agents (browsers etc) out there.

Character coding in XHTML has nothing to do with "meta" tags.
They''re only relevant for the compatibility requirements of XHTML/1.0
Appendix C.

Specifying the character coding on the real HTTP header, rather than
in this ersatz meta...http-equiv, is best, both from the theoretical
point of view as well as, on balance, practical issues, although some
folks complain that it doesn''t carry-through when the document is
saved to file.


There are few advantages to using XHTML if you are sending the content
as text/html, and many disadvantages.

In addition, currently, the majority (over 90% by most counts) of the
UA market is unable to correctly render real XHTML content sent as
text/xml (or other XML MIME types).
This is the main point that I got from reading the two links you provided.
So the moral seems to be that I made a mistake in reworking and validating
my pages as XHTML.

Back to the drawing board. Or perhaps leave it as validated xhtml without
the character set <meta> tag?


这篇关于字符集使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆