网页中的非ASCII字符 [英] Non-ASCII characters in web pages

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

问题描述

我为我的大家庭经营一个网站。该网站不是静态的,

,页面经常被添加和更改。我自己构建它,但是

我最好被描述为一个随意和简单的网页设计师。


因为我总是难以制作破折号我的页面,我

通常使用双连字符。我拥有或已经看过的书籍

HTML告诉我,我可以制作使用转义序列

(不带引号)&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&???????????????????????????????作为em-dash。一位朋友现在告诉我,我可以使用字符串&#8211制作

所需的破折号。和&#8212对于en和em-dashes分别是
,这肯定有效。


这些字符串非常不直观(这是轻描淡写的);没有

形成助记符来记住它们的明显方法。为什么书籍告诉我上面提到的

容易记住的字符串?规格有变化吗?当

和为什么?


更重要的是,网上有哪个列表我可以下载b
会列出非ASCII

字符的所有其他类似字符串:引号,空格,变音符号等?


-

Stan Goodman

Qiryat Tiv''on

以色列


要向我发送电子邮件,请将CAPITAL_LETTERS替换为 SIG" ;.请做

不要发给我HTML格式的信息。请不要事先告诉我,请给我发送附件



I run a website for my very extended family. The site is not a static one,
and pages are frequently added and changed. I constructed it by myself, but
I can best be described as a casual and unsophisticated web designer.

Because I have always had difficulty in producing dashes on my pages, I
generally use double hyphens instead. Books that I possess or have seen on
HTML tell me that I could make e.g. an em-dash by using the escape sequence
(without the quotes) "&emdash;", but this is displayed *literally* on
browsers, not as an em-dash. A friend has told me now that I can make the
desired dashes with the strings "&#8211" and "&#8212" for en- and em-dashes
respectively, and sure enough this works.

These strings are very unintuitive (which is an understatement); there is no
obvious way to form a mnemonic to remember them. Why do books tell me the
easily remembered strings I have mentioned above? Has the spec changed? When
and why?

More importantly, is there a list somewhere on the Net that I could
download, and that would list all the other similar strings for non-ASCII
characters: quotes, spaces, diacritics, etc.?

--
Stan Goodman
Qiryat Tiv''on
Israel

To send me email, please replace the CAPITAL_LETTERS with "sig". Please do
not send me HTML-formatted messages.Please do not send me attachments
without telling me beforehand.

推荐答案

Stan Goodman:
Stan Goodman:
我拥有或已经看过的书籍
HTML告诉我,我可以制作例如使用转义序列
(不带引号)& emdash;",但这在*浏览器上显示*字面*,而不是em-dash。一位朋友现在告诉我,我可以用字符串&#8211来制作所需的破折号。和&#8212分别对于en-em和em-dashes来说,这确实足够了。


它应该是mdash (不是emdash)。要么你的书都是废话,要么你b $ b应该换新的眼镜。

更重要的是,我可以在网上找到一个可以下载的列表,以及这将列出非ASCII
字符的所有其他类似字符串:引号,空格,变音符号等?
Books that I possess or have seen on
HTML tell me that I could make e.g. an em-dash by using the escape sequence
(without the quotes) "&emdash;", but this is displayed *literally* on
browsers, not as an em-dash. A friend has told me now that I can make the
desired dashes with the strings "&#8211" and "&#8212" for en- and em-dashes
respectively, and sure enough this works.
It should be "mdash" (not "emdash"). Either your books are crap, or you
should get new glasses.
More importantly, is there a list somewhere on the Net that I could
download, and that would list all the other similar strings for non-ASCII
characters: quotes, spaces, diacritics, etc.?




尝试HTML 4.01规范:


< URL:http://www.w3.org/TR/html40/sgml/entities.html>


-

Bertilo Wennergren< be ****** @ gmx.net> < http://www.bertilow.com>



Try the HTML 4.01 specification:

<URL:http://www.w3.org/TR/html40/sgml/entities.html>

--
Bertilo Wennergren <be******@gmx.net> <http://www.bertilow.com>


Stan Goodman写道:
Stan Goodman wrote:
我的书籍拥有或已经看过
HTML告诉我,我可以制作例如使用转义序列
(不带引号)& emdash;",但这在*浏览器上显示*字面*,而不是em-dash。一位朋友现在告诉我,我可以用字符串&#8211来制作所需的破折号。和&#8212分别对于en-em和em-dashes来说,这确实足够了。


Bertilo Wennergren< be ****** @ gmx.net>写道:
Books that I possess or have seen on
HTML tell me that I could make e.g. an em-dash by using the escape sequence
(without the quotes) "&emdash;", but this is displayed *literally* on
browsers, not as an em-dash. A friend has told me now that I can make the
desired dashes with the strings "&#8211" and "&#8212" for en- and em-dashes
respectively, and sure enough this works.
Bertilo Wennergren <be******@gmx.net> wrote:
它应该是mdash (不是emdash)。你的书都是废话,或者你应该买新的眼镜。
It should be "mdash" (not "emdash"). Either your books are crap, or you
should get new glasses.




公平地说,HTML 3.0(RIP)指定& endash;和& emdash;而不是

& ndash;和& mdash;由HTML 4.x指定并由现代

浏览器实现。

更重要的是,网络上是否有我可以下载的列表,以及列出非ASCII
字符的所有其他类似字符串:引号,空格,变音符号等?



To be fair, HTML 3.0 (RIP) specified &endash; and &emdash; rather than the
&ndash; and &mdash; specified by HTML 4.x and implemented by modern
browsers.
More importantly, is there a list somewhere on the Net that I could
download, and that would list all the other similar strings for non-ASCII
characters: quotes, spaces, diacritics, etc.?



尝试HTML 4.01规范:

< URL:http://www.w3.org/TR/html40/sgml/entities.html>



Try the HTML 4.01 specification:

<URL:http://www.w3.org/TR/html40/sgml/entities.html>




由于浏览器的支持,情况变得复杂,或者缺少它。


有(旧的,过时的)浏览器可以显示 - 正确,但不要显示&b; b显示& mdash;正常。所以通过使用 - 而不是& mdash ;,你

改善使用这些浏览器的读者的情况。


还有其他(更老,更陈旧)浏览器既不显示
也不显示& mdash;正常。当这些浏览器按原样显示字符名称时,mdash和mdash可能比#8212更明智,并且使用

& mdash;而不是 - ,你可以改善读者使用这些浏览器的情况。


参见 http://www.htmlhelp.com/faq/html/bas...l#special-char

-

Darin McGrew, mc****@stanfordalumni.org http://www.rahul.net/mcgrew/

网页设计组, da***@htmlhelp.com http://www.HTMLHelp.com/

体验是某种东西在你需要之后才能得到它。



The situation is complicated by browser support, or lack thereof.

There are (old, obsolete) browsers that display — properly, but don''t
display &mdash; properly. So by using — instead of &mdash;, you
improve the situation for readers using those browsers.

There are other (older, more obsolete) browsers that display neither
— nor &mdash; properly. When the character name is displayed "as is"
by such browsers, "mdash" might be more sensible than "#8212", and by using
&mdash; instead of —, you might improve the situation for readers
using those browsers.

See also http://www.htmlhelp.com/faq/html/bas...l#special-char
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Experience is something you don''t get until just after you need it."


2004年2月24日星期二00:59:46 +0100,Bertilo Wennergren< be * *****@gmx.net>

写道:

On Tue, 24 Feb 2004 00:59:46 +0100, Bertilo Wennergren <be******@gmx.net>
wrote:

它应该是mdash (不是emdash)。


这是真的。

您的书籍都是垃圾,或者您应该买新眼镜。
It should be "mdash" (not "emdash").
This is true.
Either your books are crap, or you
should get new glasses.




这是侮辱性的,没有任何目的。



This is insulting, and for no purpose.

更重要的是,我可以在网上某处找到一个列表
下载,这将列出所有其他类似的字符串
非ASCII
字符:引号,空格,变音符号等?
More importantly, is there a list somewhere on the Net that I could
download, and that would list all the other similar strings for
non-ASCII
characters: quotes, spaces, diacritics, etc.?



试试HTML 4.01规范:

< URL:http://www.w3.org/TR/html40/sgml/entities.html>



Try the HTML 4.01 specification:

<URL:http://www.w3.org/TR/html40/sgml/entities.html>




我也会给出这个非常全面的链接:

http://www.pemberley.com/janeinfo/latin1.html


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

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