Content deleted Content added
m clean up using AWB |
Misc |
||
Line 1:
{{refimprove|date=January 2011}}▼
{{SpecialChars}}
{{Html series}}
Line 24 ⟶ 23:
In order to work around the limitations of legacy encodings, HTML is designed such that it is possible to represent characters from the whole of Unicode inside an HTML document by using a [[numeric character reference]]: a sequence of characters that explicitly spell out the Unicode code point of the character being represented. A character reference takes the form '''<code>&#</code>'''<var>N</var>'''<code>;</code>''', where <var>N</var> is either a [[decimal]] number for the Unicode code point, or a [[hexadecimal]] number, in which case it must be prefixed by <code>x</code>. The characters that compose the numeric character reference are universally representable in every encoding approved for use on the Internet.
For example, a Unicode code point like U+53F6, which corresponds to a particular Chinese character, has to be converted to a decimal number, preceded by <code>&#</code> and followed by <code>;</code>, like this: <code>&#21494;</code>, which produces this: 叶 (if it doesn't look like a Chinese character, see
The support for hexadecimal in this context is more recent, so older browsers might have problems displaying characters referenced with hexadecimal numbers—but they will probably have a problem displaying Unicode characters above code point 255 anyway. To ensure better compatibility with older browsers, it is still a common practice to convert the hexadecimal code point into a decimal value (for example <code>&#21494;</code> instead of <code>&#x53F6;</code>).
Line 149 ⟶ 148:
* [[Character encodings in HTML]]
* [[wikibooks:Unicode/Character reference|Unicode character reference (wikibooks)]]
== References ==▼
<references />▼
== External links ==
Line 165 ⟶ 161:
*[http://www.pinyin.info/tools/converter/chars2uninumbers.html Web tool that converts "special" characters (such as Chinese characters) to Unicode numeric character references]
*[http://www.hotpeachpages.net/a/characters.html Multi-lingual web pages and Unicode] - how to fix display problems
▲== References ==
▲<references />
▲{{refimprove|date=January 2011}}
{{Unicode navigation}}
|