Numeric Character References

CMarkup release 6.5 adds support for decoding numeric character references encountered in a document. This is a way of specifying a character by using its Unicode value written out as a number. The numeric character references begin with &# and contain either a regular number (base 10) or a hexidecimal number prefixed with x, followed by a semi-colon. They are used mainly for whitespace and occasionally the 5 Standard Special Characters shown in the Standard column below. The standard encoding form is shown here also for those 5 characters because it is recommended over numeric referencing.

  Character Base 10 Hex Standard
  carriage return 
  line feed 

< less than &#60; &#x3c; &lt;
> greater than &#62; &#x3e; &gt;
& ampersand &#38; &#x26; &amp;
' apostrophe or single quote &#39; &#x27; &apos;
" double quote &#34; &#x22; &quot;

Numeric character references are also used to specify Unicode characters such as the Chinese character &#20013;. This is a way of manually typing Unicode characters into an XML document with an editor that does not support those characters. When you retrieve text from the document using CMarkup, it will decode these character references into the literal characters they refer to. The following table shows some sample Chinese characters (the characters themselves will be visible here if your browser font supports them) with meanings provided by

  Chinese Character Base 10 Hex
middle &#20013; &#x4e2d;
nation &#22269; &#x56fd;
human being &#20154; &#x4eba;