Prince Documentation
  • Documentation
  • Help
  • Release Notes

›Reference Guide

Installation Guide

  • Getting Started
  • Your First Document
  • Help

User Guide

  • Convert HTML to PDF
  • Styling
  • Paged Media
  • Generated Content
  • Scripting
  • Graphics
  • Prince Tips and Tricks
  • Help
  • Prince Input
  • Prince Output
  • Prince Networking
  • Server Integration
  • Prince for Books

Reference Guide

  • Command-line Reference
  • CSS References
  • CSS Properties
  • JavaScript Support
  • Page Size Keywords
  • Character Entities
  • Acknowledgments

Character Entities

Character entities are a method of including arbitrary characters in XML documents by referencing their UNICODE number rather than writing them directly. CSS has a similar mechanism to include special characters.

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"), or when you want to insert some of these characters into the final layout by means of CSS.

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.

A typical usecase for character entities in CSS is the -prince-text-replace property, which replaces a certain character string with another one. In the sample "Reconstructed Essay" (HTML - PDF), the property is used to replace occurrences of "s" with the "long s" to recreate the original printed book.

CSS

    body {
      -prince-text-replace: "s" "\017F";
    }

The tables below are a quick reference for some commonly requested UNICODE characters, expressed in XML and CSS notation; for everything else please consult the UNICODE code charts.

Accented Letters

XMLCSSCharacterName
&#xC0;\C0ÀA grave
&#xC1;\C1ÁA acute
&#xC2;\C2ÂA circumflex
&#xC3;\C3ÃA tilde
&#xC4;\C4ÄA dieresis
&#xC5;\C5ÅA ring
&#xC7;\C7ÇC cedilla
&#xC8;\C8ÈE grave
&#xC9;\C9ÉE acute
&#xCA;\CAÊE circumflex
&#xCB;\CBËE dieresis
&#xCC;\CCÌI grave
&#xCD;\CDÍI acute
&#xCE;\CEÎI circumflex
&#xCF;\CFÏI dieresis
&#xD1;\D1ÑN tilde
&#xD2;\D2ÒO grave
&#xD3;\D3ÓO acute
&#xD4;\D4ÔO circumflex
&#xD5;\D5ÕO tilde
&#xD6;\D6ÖO dieresis
&#xD8;\D8ØO slash
&#xD9;\D9ÙU grave
&#xDA;\DAÚU acute
&#xDB;\DBÛU circumflex
&#xDC;\DCÜU dieresis
&#x0178;\0178ŸY dieresis
&#xE0;\E0àa grave
&#xE1;\E1áa acute
&#xE2;\E2âa circumflex
&#xE3;\E3ãa tilde
&#xE4;\E4äa dieresis
&#xE5;\E5åa ring
&#xE7;\E7çc cedilla
&#xE8;\E8èe grave
&#xE9;\E9ée acute
&#xEA;\EAêe circumflex
&#xEB;\EBëe dieresis
&#xEC;\ECìi grave
&#xED;\EDíi acute
&#xEE;\EEîi circumflex
&#xEF;\EFïi dieresis
&#x0131;\0131ıdotless i
&#xF1;\F1ñn tilde
&#xF2;\F2òo grave
&#xF3;\F3óo acute
&#xF4;\F4ôo circumflex
&#xF5;\F5õo tilde
&#xF6;\F6öo dieresis
&#xF8;\F8øo slash
&#xF9;\F9ùu grave
&#xFA;\FAúu acute
&#xFB;\FBûu circumflex
&#xFC;\FCüu dieresis
&#xFF;\FFÿy dieresis

Symbols

XMLCSSCharacterName
&#x2022;\2022•bullet
&#xA2;\A2¢cent
&#xA9;\A9©copyright
&#xA4;\A4¤currency
&#x2020;\2020†dagger
&#xB0;\B0°degree
&#xF7;\F7÷divide
&#x2021;\2021‡double dagger
&#x0192;\0192ƒflorin
&#x2044;\2044⁄fraction
&#xA1;\A1¡inverted exclamation
&#xBF;\BF¿inverted question
&#xB5;\B5µmicro
&#xB7;\B7·middle dot
&#xAC;\AC¬not
&#xAA;\AAªordfeminine
&#xBA;\BAºordmasculine
&#xB6;\B6¶paragraph
&#x2030;\2030‰perthousand
&#xB1;\B1±plusminus
&#xAE;\AE®registered
&#xA7;\A7§section
&#xA3;\A3£sterling
&#x2122;\2122™trademark
&#xA5;\A5¥yen

Quotes

XMLCSSCharacterName
&#x2018;\2018‘left single quote
&#x2019;\2019’right single quote
&#x201C;\201C“left double quote
&#x201D;\201D”right double quote
&#x2039;\2039‹left single guillemet
&#x203A;\203A›right single guillemet
&#xAB;\AB«left double guillemet
&#xBB;\BB»right double guillemet
&#x201A;\201A‚base single quote
&#x201E;\201E„base double quote

Accents

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

Special Space Characters

XMLCSSCharacterName
&#x20;\x20foo barspace
&#xa0;\xa0foo barno-break space
&#x2008;\x2008foo barpunctuation space
&#x2009;\x2009foo barthin space
&#x200a;\x200afoo barhair space
&#x200b;\x200bfoo​barzero width space
&#x202f;\x202ffoo barnarrow no-break space
&#x205f;\x205ffoo barmedium mathematical space
&#xfeff;\xfefffoobarzero width no-break space
&#x1680;\x1680foo barogham space mark
&#x2000;\x2000foo baren quad
&#x2001;\x2001foo barem quad
&#x2002;\x2002foo baren space
&#x2003;\x2003foo barem space
&#x3000;\x3000foo barideographic space

Miscellaneous

XMLCSSCharacterName
&#x2026;\x2026…ellipsis
&#x2014;\x2014—em dash
&#x2013;\x2013–en dash
&#xFB01;\xFB01fifi ligature
&#xFB02;\xFB02flfl ligature
&#xC6;\xC6ÆAE
&#xE6;\xE6æae
&#x0152;\x0152ŒOE
&#x0153;\x0153œoe
&#xDF;\xDFßsharp s
← Page Size KeywordsAcknowledgments →
  • Accented Letters
  • Symbols
  • Quotes
  • Accents
  • Special Space Characters
  • Miscellaneous
About us | Privacy Policy | Contact
Copyright © 2022 YesLogic Pty. Ltd.