Home > Articles

  • Print
  • + Share This
This chapter is from the book

Character Encodings

Character sets are sets of characters which allow a document to be interpreted in a specific way. By using entities from a character set, an author can include letters, glyphs, symbols, and foreign characters in their documents.

Table 3.5 describes a number of popular character sets commonly used to represent characters found in specific languages.

TIP

UTF-8 is a universal character set. Support for it is inconsistent, but growing. If you're authoring documents with specific character set requirements, you might still prefer to use the exact character set in question.

Table 3.5 Character Sets by Language (Partial List, Source: W3C Internationalization Documents)

Language

Character Set

Language

Character Set

Afrikaans

iso-8859-1

Inuit

iso-8859-10*

Albanian

iso-8859-1

Irish

iso-8859-1

Arabic

iso-8859-6

Italian

iso-8859-1

Basque

iso-8859-1

Japanese

iso-2022-jp, euc-jp

Bulgarian

iso-8859-5

Lapp

iso-8859-10*

Byelorussian

iso-8859-5

Latvian

iso-8859-13

Catalan

iso-8859-1

Lithuanian

iso-8859-13

Croatian

iso-8859-2

Macedonian

iso-8859-5

Czech

iso-8859-2

Maltese

iso-8859-3*

Danish

iso-8859-1

Norwegian

iso-8859-1

Dutch

iso-8859-1

Polish

iso-8859-2

English

iso-8859-1

Portuguese

iso-8859-1

Esperanto

iso-8859-3*

Romanian

iso-8859-2

Estonian

iso-8859-15

Russian

koi8-r, iso-8859-5

Faroese

iso-8859-1

Scottish

iso-8859-1

Finnish

iso-8859-1

Serbian

iso-8859-5

French

iso-8859-1

Slovak

iso-8859-2

Galician

iso-8859-1

Slovenian

iso-8859-2

German

iso-8859-1

Spanish

iso-8859-1

Greek

iso-8859-7

Swedish

iso-8859-1

Hebrew

iso-8859-8

Turkish

iso-8859-9

Hungarian

iso-8859-2

Ukrainian

iso-8859-5

Icelandic

iso-8859-1

 

 


NOTE

For a complete list of character sets available, see the following registry: http://www.iana.org/assignments/character-sets.

You'll notice that many languages refer to the same character set, such as English, French, German, and Italian. The reason for this is because the character set in question contains the majority of characters required to represent that language. Character sets with an asterisk (*) beside them are those with known browser-support problems.

Single characters can be embedded into documents using character entity references. These references have a numeric value as well as a named value. You can use either one just so long as it is allowed within the DTD in question.

Using character entities is particularly helpful when the encoding set doesn't express all the characters that you might want to use in the document. For example, if I were authoring a document in English and wanted to use an inverted exclamation mark for a Spanish quotation, I'd use an entity to create that character. Other character entity references help control space, symbols, and so on. (See Table 3.6.)

There are three types of character entities available in HTML and XHTML.

  • ISO 8859-1 characters—This set includes the Latin set of character entities.

  • Symbols, mathematical characters, and Greek letters—This set includes entities for various symbols (such as copyright symbols and so on), math characters, and Greek letters.

  • Markup-significant characters—This set includes internationalization characters such as those required for bi-directional text.

Learn more about internationalization in "Designing International Documents," p. 435, Chapter 18.

Table 3.6  Named Entities

Named Entity

Numeric

Entity Description

nbsp

 

non-breaking space

iexcl

¡

inverted exclamation mark

cent

¢

cent sign

pound

£

pound sign

curren

¤

currency sign

yen

¥

yen sign

brvbar

¦

broken vertical bar

sect

§

section sign

uml

¨

diaeresis

copy

©

copyright sign

ordf

ª

feminine ordinal indicator

laquo

«

left-pointing double angle quotation mark

not

¬

not sign

shy

­

soft hyphen

reg

®

registered sign

macr

¯

macron

deg

°

degree sign

plusmn

±

plus-minus sign

sup2

²

superscript two

sup3

³

superscript three

acute

´

acute accent

micro

µ

micro signB5

para

¶

pilcrow sign

middot

·

middle dot

cedil

¸

cedilla

sup1

¹

superscript one

ordm

º

masculine ordinal indicator

raquo

»

right-pointing double angle quotation mark

frac14

¼

vulgar fraction one-quarter

frac12

½

vulgar fraction one-half

frac34

¾

vulgar fraction three-quarters

iquest

¿

inverted question mark

Agrave

À

Latin capital letter A with grave

Aacute

Á

Latin capital letter A with acute

Acirc

Â

Latin capital letter A with circumflex

Atilde

Ã

Latin capital letter A with tilde

Auml

Ä

Latin capital letter A with diaeresis

Aring

Å

Latin capital letter A with ring above

AElig

Æ

Latin capital letter AE

Ccedil

Ç

Latin capital letter C with cedilla

Egrave

È

Latin capital letter E with grave

Eacute

É

Latin capital letter E with acute

Ecirc

Ê

Latin capital letter E with circumflex

Euml

Ë

Latin capital letter E with diaeresis

Igrave

Ì

Latin capital letter I with grave

Iacute

Í

Latin capital letter I with acute

Icirc

Î

Latin capital letter I with circumflex

Iuml

Ï

Latin capital letter I with diaeresis

eth

Ð

Latin capital letter eth

Ntilde

Ñ

Latin capital letter N with tilde

Ograve

Ò

Latin capital letter O with grave

Oacute

Ó

Latin capital letter O with acute

Ocirc

Ô

Latin capital letter O with circumflex

Otilde

Õ

Latin capital letter O with tilde

Ouml

Ö

Latin capital letter O with diaeresis

times

×

multiplication sign

Oslash

Ø

Latin capital letter O with stroke

Ugrave

Ù

Latin capital letter U with grave

Uacute

Ú

Latin capital letter U with acute

Ucirc

Û

Latin capital letter U with circumflex

Uuml

Ü

Latin capital letter U with diaeresis

Yacute

Ý

Latin capital letter Y with acute

thorn

Þ

Latin capital letter thorn

szlig

ß

Latin small letter sharp

agrave

à

Latin small letter a with grave

aacute

á

Latin small letter a with acute

acirc

â

Latin small letter a with circumflex

atilde

ã

Latin small letter a with tilde

auml

ä

Latin small letter a with diaeresis

aring

å

Latin small letter a with ring above

aelig

æ

Latin small letter ae

ccedil

ç

Latin small letter c with cedilla

egrave

è

Latin small letter e with grave

eacute

é

Latin small letter e with acute

ecirc

ê

Latin small letter e with circumflex

euml

ë

Latin small letter e with diaeresis

igrave

ì

Latin small letter i with grave

iacute

í

Latin small letter i with acute

icirc

î

Latin small letter i with circumflex

iuml

ï

Latin small letter i with diaeresis

eth

ð

Latin small letter eth

ntilde

ñ

Latin small letter n with tilde

ograve

ò

Latin small letter o with grave

oacute

ó

Latin small letter o with acute

ocirc

ô

Latin small letter o with circumflex

otilde

õ

Latin small letter o with tilde

ouml

ö

Latin small letter o with diaeresis

divide

÷

division sign

oslash

ø

Latin small letter o with stroke

ugrave

ù

Latin small letter u with grave

uacute

ú

Latin small letter u with acute

ucirc

û

Latin small letter u with circumflex

uuml

ü

Latin small letter u with diaeresis

yacute

ý

Latin small letter y with acute

thorn

þ

Latin small letter thorn

yuml

ÿ

Latin small letter y with diaeresis


Table 3.7 describes general symbols, Greek, and mathematical symbols available.

Table 3.7  Symbols, Greek Symbols, and Math Symbol Entities

Named Entity

Numeric

Entity Description

fnof

ƒ

Latin small f with hook

Alpha

Α

Greek capital letter alpha

Beta

Β

Greek capital letter beta

Gamma

Γ

Greek capital letter gamma

Delta

Δ

Greek capital letter delta

Epsilon

Ε

Greek capital letter epsilon

Zeta

Ζ

Greek capital letter zeta

Eta

Η

Greek capital letter eta

Theta

Θ

Greek capital letter theta

Iota

Ι

Greek capital letter iota

Kappa

Κ

Greek capital letter kappa

Lambda

Λ

Greek capital letter lambda

Mu

Μ

Greek capital letter mu

Nu

Ν

Greek capital letter nu

Xi

Ξ

Greek capital letter xi

Omicron

Ο

Greek capital letter omicron

Pi

Π

Greek capital letter pi

Rho

Ρ

Greek capital letter rho

Sigma

Σ

Greek capital letter sigma

Tau

Τ

Greek capital letter tau

Upsilon

Υ

Greek capital letter upsilon

Phi

Φ

Greek capital letter phi

Chi

Χ

Greek capital letter chi

Psi

Ψ

Greek capital letter psi

Omega

Ω

Greek capital letter omega

alpha

α

Greek small letter alpha

beta

β

Greek small letter beta

gamma

γ

Greek small letter gamma

delta

δ

Greek small letter delta

epsilon

ε

Greek small letter epsilon

zeta

ζ

Greek small letter zeta

eta

η

Greek small letter eta

theta

θ

Greek small letter theta

iota

ι

Greek small letter iota

kappa

κ

Greek small letter kappa

lambda

λ

Greek small letter lambda

mu

μ

Greek small letter mu

nu

ν

Greek small letter nu

xi

ξ

Greek small letter xi

omicron

ο

Greek small letter omicron

pi

π

Greek small letter pi

rho

ρ

Greek small letter rho

sigmaf

ς

Greek small letter final sigma

sigma

σ

Greek small letter sigma

tau

τ

Greek small letter tau

upsilon

υ

Greek small letter upsilon

phi

φ

Greek small letter phi

chi

χ

Greek small letter chi

psi

ψ

Greek small letter psi

omega

ω

Greek small letter omega

thetasym

ϑ

Greek small letter theta symbol

upsih

ϒ

Greek upsilon with hook symbol

piv

ϖ

pi symbol

bull

•

bullet

hellip

…

horizontal ellipsis

prime

′

prime

Prime

″

double prime

oline

‾

overline

frasl

⁄

fraction slash

weierp

℘

script capital

image

ℑ

blackletter capital I

real

ℜ

blackletter capital R

trade

™

trade mark sign

alefsym

ℵ

alef symbol

larr

←

leftward arrow

uarr

↑

upward arrow

rarr

→

rightward arrow

darr

↓

downward arrow

harr

↔

left right arrow

crarr

↵

downward arrow with corner leftward

lArr

⇐

leftward double arrow

uArr

⇑

upward double arrow

rArr

⇒

rightward double arrow

dArr

⇓

downward double arrow

hArr

⇔

left-right double arrow

forall

∀

for all

part

∂

partial differential

exist

∃

there exists

empty

∅

empty set

nabla

∇

nabla

isin

∈

element of

notin

∉

not an element of

ni

∋

contains as member

prod

∏

n-ary product

sum

∑

n-ary summation

minus

−

minus sign

lowast

∗

asterisk operator

radic

√

square root

prop

∝

proportional to

infin

∞

infinity

ang

∠

angle

and

∧

logical and

or

∨

logical or

cap

∩

intersection

cup

∪

union

int

∫

integral

there4

∴

therefore

sim

∼

tilde operator

cong

≅

approximately equal to

asymp

≈

almost equal to

ne

≠

not equal to

equiv

≡

identical to

le

≤

less-than or equal to

ge

≥

greater-than or equal to

sub

⊂

subset of

sup

⊃

superset of

nsub

⊄

not a subset of

sube

⊆

subset of or equal to

supe

⊇

superset of or equal to

oplus

⊕

circled plus

otimes

⊗

circled times

perp

⊥

up tack

sdot

⋅

dot operator

lceil

⌈

left ceiling

rceil

⌉

right ceiling

lfloor

⌊

left floor

rfloor

⌋

right floor

lang

〈

left-pointing angle bracket

rang

〉

right-pointing angle bracket

loz

◊

lozenge

spades

♠

black (solid) spade suit

clubs

♣

black (solid) club suit

hearts

♥

black (solid) heart suit

diams

♦

black (solid) diamond suit


Table 3.8 shows markup significant characters. It's important to note that some of these characters are considered new and may not be supported by some browsers and language version types.

NOTE

If you've noticed a few seemingly missing numeric representations for characters, such as ΢ it's because they've not been defined in this character set.

Table 3.8  Markup Significant Characters

Named Entity

Numeric

Entity Description

quot

"

quotation mark

amp

&

ampersand

lt

<

less-than sign

gt

>

greater-than sign

OElig

Œ

Latin capital ligature OE

oelig

œ

Latin small ligature oe

Scaron

Š

Latin capital letter S with caron

scaron

š

Latin small letter s with caron

Yuml

Ÿ

Latin capital letter Y with diaeresis

circ

ˆ

modifier letter circumflex accent

tilde

˜

small tilde

ensp

 

en space

emsp

 

em space

thinsp

 

thin space

zwnj

‌

zero width non-joiner

zwj

‍

zero width joiner

lrm

‎

left-to-right mark

rlm

‏

right-to-left mark

ndash

–

en dash

mdash

—

em dash

lsquo

‘

left single quotation mark

rsquo

’

right single quotation mark

sbquo

‚

single low-9 quotation mark

ldquo

“

left double quotation mark

rdquo

”

right double quotation mark

bdquo

„

double low-9 quotation mark

dagger

†

dagger

Dagger

‡

double dagger

permil

‰

per mille sign

lsaquo

‹

single left-pointing angle quotation

rsaquo

›

single right-pointing angle quotation

euro

€

euro sign


NOTE

Media types are defined using the media attribute, or the @media construct in CSS. You can use more than one media descriptor in either case.

  • + Share This
  • 🔖 Save To Your Account