开发者

Rendering HTML symbols/entities in Chrome

is it just me, or does Chrome no longer render HTML characters such as the —? I've tried changing the DOCTYPE, changing the character encoding meta tag, changing the character encoding option in Chrome, and even using the entity number instead of the entity n开发者_如何学Pythoname. I cannot for the life of me get Chrome to display an em dash, and I've noticed that it isn't rendering it for other sites as well. Has anyone else had this problem also?

UPDATE

Are you sure the font you're using actually has an em dash character? - Andrew Marshall

It just dawned on me what's going on. A while ago, I wanted to be able to use Helvetica Neue on Windows, and I didn't want to fork out a few hundred bucks, so I copied the font file from a Mac, converted it to a TTF on Ubuntu, and brought it over to Windows. I guess the tool I used didn't convert all the characters because it obviously can't display the em dash. The only reason I noticed the problem in Chrome is because the other non-webkit browsers wouldn't use Helvetica Neue for some reason.

Arg... I feel stupid. Thanks for the help!


I'd argue that HTML entities should be avoided (except &, of course). Instead just use the actual character and declare (and save) your HTML as UTF-8, something you should already be doing.

There are several top sites that do this, in particular with the use of © instead of ©.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜