IE9:如何使Unicode字符正确显示? [英] IE9: How to make Unicode characters appear properly?

查看:66
本文介绍了IE9:如何使Unicode字符正确显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个网站(www.lathamcity.com),在其中使用Unicode字符&#x2022表示标题中的项目符号.但是,当我在IE9中加载页面时,项目符号点不会出现,而是该字符的Unicode.

I am designing a website (www.lathamcity.com) where I use the Unicode character &#x2022 to represent a bullet point in my header. When I load the page in IE9, however, the bullet point does not appear and in its place is the Unicode for the character.

我的字符集在HTML文档中定义为

My charset is defined in the HTML document with

<meta charset="UTF-8">

标题的代码是

    <td id="infoCell" class="header">   
        <a href="/resume.pdf" class="header" target="_blank">R&#233sum&#233</a> 
        &nbsp &#x2022 &nbsp 
        <a href="mailto:acl68@case.edu" class="header" target="_blank">E-mail</a> 
        &nbsp &#x2022 &nbsp
        <a href="https://github.com/orthogonal/" class="header" target="_blank">GitHub</a>
        &nbsp &#x2022 &nbsp
        <a href="http://stackoverflow.com/users/1146679/andrew-latham" class="header" target="_blank">StackOverflow</a>
        &nbsp &#x2022 &nbsp
        <a href="http://main.uschess.org/assets/msa_joomla/MbrDtlMain.php?12842311" class="header" target="_blank">USCF</a>
    </td>

字符在Chrome和Firefox中正确显示.我在做什么错,为什么会发生,怎么解决?

The characters appear correctly in Chrome and Firefox. What am I doing wrong, why is it happening, and how can I fix it?

推荐答案

您缺少分号.

&#x2022

应该是

&#x2022;

类似地,&nbsp&#233应该以;结尾.

Similarly, &nbsp and &#233 should end with a ;.

HTML5规范说:

十六进制数字字符参考

与号后必须跟一个U + 0023数字符号(#),然后必须跟一个U + 0078拉丁小写字母X字符(x)或U + 0058拉丁大写字母X字符(X ),然后必须在U + 0030数字零(0)至U + 0039数字九(9),U + 0061拉丁小写字母A至U + 0066拉丁小写字母F和以下范围内一位或多位数字后面U + 0041拉丁文大写字母A到U + 0046拉丁文大写字母F,代表一个基数为16的整数,它对应于根据以下定义允许的Unicode代码点. 然后必须在数字后面加上U + 003B SEMICOLON字符(;).

The ampersand must be followed by a U+0023 NUMBER SIGN character (#), which must be followed by either a U+0078 LATIN SMALL LETTER X character (x) or a U+0058 LATIN CAPITAL LETTER X character (X), which must then be followed by one or more digits in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), U+0061 LATIN SMALL LETTER A to U+0066 LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL LETTER A to U+0046 LATIN CAPITAL LETTER F, representing a base-sixteen integer that corresponds to a Unicode code point that is allowed according to the definition below. The digits must then be followed by a U+003B SEMICOLON character (;).

这篇关于IE9:如何使Unicode字符正确显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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