Character Entities

Character entities are a method of including arbitrary characters in XML documents by referencing their UNICODE number rather than writing them directly.

This can be convenient when you wish to include characters such as smart quotes, symbols or mathematical operators that do not exist in the character encoding that you are using for your XML documents (such as ASCII or ISO-8859-1 "Latin-1").

Here is an example of including smart quotes in an XML document using character entities:

XML

<p>
These are &#x201C;smart quotes&#x201D; to be precise.
</p>

Output

These are “smart quotes” to be precise.

The tables below are a quick reference for some commonly requested UNICODE characters; for everything else please consult the UNICODE code charts.

Accented Letters

&#xC0; À A grave
&#xC1; Á A acute
&#xC2; Â A circumflex
&#xC3; Ã A tilde
&#xC4; Ä A dieresis
&#xC5; Å A ring
&#xC7; Ç C cedilla
&#xC8; È E grave
&#xC9; É E acute
&#xCA; Ê E circumflex
&#xCB; Ë E dieresis
&#xCC; Ì I grave
&#xCD; Í I acute
&#xCE; Î I circumflex
&#xCF; Ï I dieresis
&#xD1; Ñ N tilde
&#xD2; Ò O grave
&#xD3; Ó O acute
&#xD4; Ô O circumflex
&#xD5; Õ O tilde
&#xD6; Ö O dieresis
&#xD8; Ø O slash
&#xD9; Ù U grave
&#xDA; Ú U acute
&#xDB; Û U circumflex
&#xDC; Ü U dieresis
&#x0178; Ÿ Y dieresis
&#xE0; à a grave
&#xE1; á a acute
&#xE2; â a circumflex
&#xE3; ã a tilde
&#xE4; ä a dieresis
&#xE5; å a ring
&#xE7; ç c cedilla
&#xE8; è e grave
&#xE9; é e acute
&#xEA; ê e circumflex
&#xEB; ë e dieresis
&#xEC; ì i grave
&#xED; í i acute
&#xEE; î i circumflex
&#xEF; ï i dieresis
&#x0131; ı dotless i
&#xF1; ñ n tilde
&#xF2; ò o grave
&#xF3; ó o acute
&#xF4; ô o circumflex
&#xF5; õ o tilde
&#xF6; ö o dieresis
&#xF8; ø o slash
&#xF9; ù u grave
&#xFA; ú u acute
&#xFB; û u circumflex
&#xFC; ü u dieresis
&#xFF; ÿ y dieresis

Symbols

&#x2022; bullet
&#xA2; ¢ cent
&#xA9; © copyright
&#xA4; ¤ currency
&#x2020; dagger
&#xB0; ° degree
&#xF7; ÷ divide
&#x2021; double dagger
&#x0192; ƒ florin
&#x2044; fraction
&#xA1; ¡ inverted exclamation
&#xBF; ¿ inverted question
&#xB5; µ micro
&#xB7; · middle dot
&#xAC; ¬ not
&#xAA; ª ordfeminine
&#xBA; º ordmasculine
&#xB6; paragraph
&#x2030; perthousand
&#xB1; ± plusminus
&#xAE; ® registered
&#xA7; § section
&#xA3; £ sterling
&#x2122; trademark
&#xA5; ¥ yen

Quotes

&#x2018; left single quote
&#x2019; right single quote
&#x201C; left double quote
&#x201D; right double quote
&#x2039; left single guillemet
&#x203A; right single guillemet
&#xAB; « left double guillemet
&#xBB; » right double guillemet
&#x201A; base single quote
&#x201E; base double quote

Accents

&#xB4; ´ acute
&#x02D8; ˘ breve
&#x02C7; ˇ caron
&#xB8; ¸ cedilla
&#x5E; ^ circumflex
&#xA8; ¨ dieresis
&#x02D9; ˙ dot accent
&#x02DD; ˝ double acute
&#xAF; ¯ macron
&#x02DB; ˛ ogonek
&#x02DA; ˚ ring
&#x02DC; ˜ tilde

Miscellaneous

&#x2026; ellipsis
&#x2014; em dash
&#x2013; en dash
&#xFB01; fi ligature
&#xFB02; fl ligature
&#xA0;   non-breaking space
&#xC6; Æ AE
&#xE6; æ ae
&#x0152; Œ OE
&#x0153; œ oe
&#xDF; ß sharp s