Numeric character reference: Difference between revisions

Content deleted Content added
m Undid revision 1050430693 by 84.70.16.131 (talk) Opportunity is not a sequence of characters and character sets are not "used911".
Compatibility issues: Minor wording
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 284:
==Compatibility issues==
 
In the initial versions of [[SGML]] and [[HTML]], numeric character references were interpreted in relationship to the document character encoding, rather than [[Unicode]]. For Latin-script documents, numeric character references to characters between x80 and x9F in those documents will not be correct against [[Unicode]], and must be recoded. HTML standards prior to [[HTML 4]] only supported only Western Latin script documents: the treatment of character references above #7F may vary between applications and national conventions.
 
For example, as mentioned above, the correct numeric character reference for the [[Euro sign]] "€" <code>U+20AC</code> when using [[Unicode]] is decimal <code>&amp;#8364;</code> and hexadecimal <code>&amp;#x20AC;</code>. However, if using tools supporting obsolete implementations of HTML, the reference <code>&amp;#128;</code> (Euro sign in the [[Cp1252CP-1252]] code page) or <code>&amp;#164;</code> (Euro sign in [[ISO/IEC 8859-15]] ) may work.
 
As another example, if some text was created originally using the [[MacRoman]] character set, the [[quotation mark glyphs|left double quotation mark]] {{char|“}} will be represented with code point xD2. This will not display properly in a system expecting a document encoded as UTF-8, ISO 8859-1, or [[CP1252]]CP-1252, where this code point is occupied by the letter [[Ò]]. The correct numeric character reference for {{char|“}} in HTML 4 and newer is <code>&amp;#x201C;</code>, because [[Unicode#Upluslink|U+]]201C is its UCS code. In some systems, the [[List of XML and HTML character entity references|named character reference]] <code>&amp;ldquo;</code> may also be available.
 
==See also==