HTML entities and charset in IE

2019-02-05 05:44发布

I am displaying html entity ✓ (a check mark: ✓) in an html document that uses iso-8859-1 for the character set.

In Firefox, it displays as a check mark. In IE, it displays as a square box. Switching to UTF-8 doesn't seem to make a difference.

Is there a reliable way to display these entities in IE 6 & 7 without using images?

7条回答
Luminary・发光体
2楼-- · 2019-02-05 06:16

If it's IE, you can reasonably assume it's on Windows, and hence, there's a WingDings font available... The letter ü in MS WingDings is a simple checkmark (similar to ✓), and þ is a checkmark in a box (similar to ☑).

查看更多
等我变得足够好
3楼-- · 2019-02-05 06:17

I specified the font attributes in a style tag and the checkmark is displayed properly in IE7 which is what the majority of my clients are using. Example:

✓ Some text

查看更多
Root(大扎)
4楼-- · 2019-02-05 06:19

You probably want to use font-family: Arial Unicode MS, Arial, Sans-Serif. IE does not display properly unicode chars from Arial...

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-02-05 06:21

Perhaps the typeface used by Internet Explorer doesn’t have a glyph to display this character.

查看更多
劳资没心,怎么记你
6楼-- · 2019-02-05 06:23

Per http://www.w3.org, the check mark isn't part of 8859-1: http://www.w3.org/TR/html401/sgml/entities.html

It's e29c93 in UTF-8.

查看更多
虎瘦雄心在
7楼-- · 2019-02-05 06:29

You can try the square root symbol, "√", which doesn't look perfect but ok. √

查看更多
登录 后发表回答