Unicode spaces

This little document lists the various space characters in Unicode. For a description, consult chapter 6 Writing Systems and Punctuation and block description General Punctuation in the Unicode standard.

The third column of the following table shows the appearance of the space character, in the sense that the cell contains the words “foo” and “bar” in bordered boxes separated by that character. It is quite possible that your browser does not present all the space characters properly. This mostly depends on the font used.

Space characters in Unicode
Code Name of the character Sample Width of the character
U+0020 SPACE foo bar Depends on font, often adjusted (see below)
U+00A0 NO-BREAK SPACE foo bar As a space, but often not adjusted
U+2000 EN QUAD foo bar 1 en (= 1/2 em)
U+2001 EM QUAD foobar 1 em (nominally, the height of the font)
U+2002 EN SPACE foobar 1 en (= 1/2 em)
U+2003 EM SPACE foobar 1 em
U+2004 THREE-PER-EM SPACE foobar 1/3 em
U+2005 FOUR-PER-EM SPACE foobar 1/4 em
U+2006 SIX-PER-EM SPACE foobar 1/6 em
U+2007 FIGURE SPACE foobar “Tabular width”, the width of digits
U+2008 PUNCTUATION SPACE foobar The width of a period “.”
U+2009 THIN SPACE foobar 1/5 em (or sometimes 1/6 em)
U+200A HAIR SPACE foobar Narrower than THIN SPACE
U+200B ZERO WIDTH SPACE foobar Nominally no width, but may expand
U+202F NARROW NO-BREAK SPACE foobar Narrower than NO-BREAK SPACE (or SPACE)
U+205F MEDIUM MATHEMATICAL SPACE foobar 4/18 em
U+3000 IDEOGRAPHIC SPACE foo bar The width of ideographic (CJK) characters.
U+FEFF ZERO WIDTH NO-BREAK SPACE foobar No width (the character is invisible)

Notes on browser support

In my tests, when Times New Roman or Arial is used, IE 6 shows only the first two (space, no-break space) and the last two (ideographic space, zero-width no-break space) correctly, presenting the other space characters as small rectangles that indicate unrepresentable glyphs or as spaces of incorrect width. When Arial Unicode MS is used, all but the narrow no-break space (which was added to Unicode in version 3.0) are shown correctly. Code2000 shows all the space characters correctly, but it has not been installed on most computers, and it has been designed to use font smoothing, so without it, the appearance is bad.

The use of various space characters of specific width, such as THIN SPACE, is generally risky. Many common fonts lack glyphs for the characters, causing a generic glyph of unrepresentable character to be shown. Consider using other methods, such as the features of a text processing program or (on Web pages) CSS properties like word-spacing and letter-spacing, to affect the amount of spacing between words or characters.

Width adjustments

In text processing, Web page display, and other contexts, space characters are often “adjustable” in the sense that they are presented in different widths, especially to satisfy justification requirements. No-break spaces, on the other hand, are defined in Unicode as having the same width as spaces, and this corresponds to common practice. But they are often treated as having fixed width (in each font), which means that in adjusted text, spaces and no-break spaces have different effects.

The ZERO-WIDTH SPACE character has nominally no width, but it too may be expanded during justification.

The Unicode standard describes the adjustment process and the intended role of specific-width space characterss as follows:

The fixed-width space characters (U+2000..U+200A) are derived from conventional (hot lead) typography. Algorithmic kerning and justification in computerized typography do not use these characters. However, where they are used, as, for example, in typesetting mathematical formulae, their width is generally font-specified, and they typically do not expand during justification. The exception is U+2009 THIN SPACE, which sometimes gets adjusted.

Other notes

The MEDIUM MATHEMATICAL SPACE character was added in Unicode version 4.0.

Regarding the non-breaking property of no-break space and other characters, see Unicode line breaking rules: explanations and criticism.

See also Microsoft’s Space Characters Design Standards. It explicitly says: “In digital fonts there are only two kinds of space characters supported by most computers, the space and the no-break space.”

Alan Wood’s excellent Unicode resources contain a page on the General Punctuation block, with widths of space characters illustrated graphically.

Demonstration

This paragraph is here for demonstration purposes only, and it contains normal SPACE characters between words.

This paragraph is here for demonstration purposes only, and it contains SIX-PER EM SPACE characters instead of normal SPACE characters between words.