O'Reilly logo

Java Servlet Programming, 2nd Edition by William Crawford, Jason Hunter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix E. Character Entities

The following table lists the various Unicode escapes, HTML numeric entities, and HTML named entites for all printable ISO-8859-1 (Latin-1) characters.

The numeric and named entities may be used within HTML pages; they are converted to symbols by web browsers. Unicode escapes may be used within servlet code; they are interpreted by the Java compiler. For example, a pound sign (£) can be embedded in an HTML page as £ or £. It can be embedded directly in Java code as \u00A3.

Note that not every HTML character entity is universally supported. The Support column indicates its level of support. An S value means the numeric and named entity values for the symbol are part of the HTML standard. A P indicates the entity values are proposed standards—not part of the HTML standard but in most cases widely supported. An N in the column indicates the entity values are nonstandard and poorly supported. For these symbols, it’s often best to use Unicode escapes.

Unicode Escape

Numeric Entity

Named Entity

Symbol

Description

Support

\u0009

	

 

\t

Horizontal tab

S

\u000A




 

\n

Line feed

S

\u000D



 

\r

Carriage return

S

\u0020

 

  

Space

S

\u0021

!

 

!

Exclamation point

S

\u0022

"

"

"

Quotation mark

S

\u0023

#

 

#

Hash mark

S

\u0024

$

 

$

Dollar sign

S

\u0025

%

 

%

Percent sign

S

\u0026

&

& ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required