需要HTML字符实体,但在哪些情况下? [英] HTML character entities needed, but in which cases?

查看:63
本文介绍了需要HTML字符实体,但在哪些情况下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML HTML专家,

我明白你会使用HTML字符实体为& auml;并且& euro;

但是为什么有人会编码:


a冒号:":",

a分号" ;;",



a gramatical period"。"



http://hotwired.lycos.com/webmonkey/...al_characters/


冒号在HTML流中只占一个字节;为什么使用5?

Hi HTML gurus,

I understand that you would use HTML character entities for ä and €
but why on earth would anyone encode:

a colon: ":",
a semicolon ";",
or
a gramatical period "."
?

http://hotwired.lycos.com/webmonkey/...al_characters/

A colon should take only one byte in the HTML stream; why using 5?

推荐答案

lb ***** @ hotmail.com (Albretch)写道:
lb*****@hotmail.com (Albretch) wrote:
嗨HTML专家,

我知道你会使用HTML字符实体来实现& auml ;和& euro;
但是为什么有人会编码:

冒号:":",
分号" ;;",
或者
一个古老的时期。


你不会。但是每个角色都有相应的代码,无论是或者b / b $ b,没有人会有任何理由使用它。他们只是给你代码0-255的完整清单以供参考。
http://hotwired.lycos.com/webmonkey/...al_characters/



-

Harlan Messinger

从我的电子邮件地址中删除第一个点。

Veuillez?ter le premier point de mon adresse de courriel。


--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ?ter le premier point de mon adresse de courriel.


lb*****@hotmail.com (Albretch)写道:
lb*****@hotmail.com (Albretch) wrote:
嗨HTML专家,


说话,凡人。

我明白你会使用HTML字符实体for& auml;
和& euro;


不,你不是。没有字符实体。只是实体

引用可以扩展为字符引用,指定

个字符。为什么要使用这些实体? (原因可能很好

,但大多数人的原因都不是。)

但是为什么有人会编码:
<一个冒号::,一个分号;,
或一个古老的句号。



谁知道?你为什么要问?如果你愿意,你可以使用这样的引用。

有些人用它们进行琐碎的混淆。在某些奇怪的情况下,有人可能会遇到一个问题,即通过

获取可能吃冒号的东西。但如果你没有看到任何理由使用

这些参考文献,因为大部分时间都不是,为什么你需要担心

他们。
http://hotwired.lycos.com/webmonkey /...al_characters/

这不仅仅是不可靠的信息,这是完全错误的。好吧,并非所有的信息都是错误的,但为什么你会使用你不能依赖的参考资料?

冒号应该是在HTML流中只占一个字节;


可能需要任意数量的字节,具体取决于编码。

为什么使用5?
Hi HTML gurus,
Speak, mortal.
I understand that you would use HTML character entities for &auml;
and &euro;
No, you don''t. There are no "character entities". Just entity
references that may expand to character references, which designate
characters. And why would you use those entities? (There might be good
reasons, but most of people''s reasons aren''t.)
but why on earth would anyone encode:

a colon: ":",
a semicolon ";",
or
a gramatical period "."
?
Who knows? Why do you ask? You can use such references if you like.
Some people use them for trivial obfuscation. In some odd situation,
someone might have a problem of getting an HTML document through
something that may eat colons. But if you don''t see any reason to use
those references, as most of don''t most of the time, why would you need
to worry about them.
http://hotwired.lycos.com/webmonkey/...al_characters/
It''s not just unreliable information, it''s plain wrong. Well, not all
of the information is wrong, but why would you use a reference that you
cannot rely on?
A colon should take only one byte in the HTML stream;
It may take any number of bytes, depending on the encoding.
why using 5?




One''s":"或许,钥匙坏了。


-

Yucca, http://www.cs.tut.fi/~jkorpela/

关于网页制作的网页: http://www.cs.tut.fi/~jkorpela/www.html



One''s ":" key is broken, perhaps.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


2004年2月22日,Sun,Jukka K. Korpela引用:
On Sun, 22 Feb 2004, Jukka K. Korpela quoted:
http://hotwired.lycos.com/webmonkey/ .. .al_characters /



这不仅仅是不可靠的信息,



It''s not just unreliable information,




这是_very_ strange收集乱码,不是吗?人们不得不怀疑他们希望通过提供他们自己的竞争列表来获得他们希望获得的奖金

可以从定义HTML的人那里免费获得。并且

没有任何与权威来源的链接。


(当然,我知道你和我有名单,但我们没有尝试

与W3C竞争。



It''s a _very_ strange garbled collection, isn''t it? One has to wonder
what they hoped to gain by providing their own competing list against
one that''s freely available from the people who defined HTML. And
without any kind of link to the authoritative sources.

(Sure, I know that you and I have lists, but we''re not trying to
compete with the W3C).


这篇关于需要HTML字符实体,但在哪些情况下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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