Skip to Content
Unicode Explained
book

Unicode Explained

by Jukka K. Korpela
June 2006
Beginner
688 pages
26h 18m
English
O'Reilly Media, Inc.
Content preview from Unicode Explained
ciple, since UCS-4 operated on a 31-bit coding space, UTF-32 on a 21-bit coding space.
The decision to stick to 21-bit coding space removed the distinction. The difference is
now nominal, and it is more natural to use the name UTF-32.
UTF-16 and UCS-2
The UCS-2 and UTF-16 encodings use 16-bit code units. In these encodings, all char-
acters in the Basic Multilingual Plane (BMP), and hence most characters that people
use these days, are represented directly: a character is represented as one code unit. It
represents the code number of the character as one unsigned 16-bit integer. Thus, the
encodings are structurally simpler than UTF-8.
UCS-2 Is BMP Only
UCS-2 is by definition limited to BMP. It is therefore not a full Unicode encoding: you
cannot represent all Unicode data in UCS-2. On the other hand, UTF-16 is basically
UCS-2 enhanced with a mechanism (surrogate pairs) for representing Unicode char-
acters outside BMP. If you don’t use such characters, UTF-16 effectively behaves as
UCS-2.
Thus, UCS-2 can be regarded as mainly historical. It is however still part of the ISO
10646 standard—but not part of the Unicode standard. The registered MIME name of
UCS-2 is ISO-10646-UCS-2.
Surrogate Pairs in UTF-16
UTF-16 uses surrogate pairs to overcome the 16 bit limitation. This means that some
16-bit values have been reserved for use as a high (leading) or low (trailing) value in a
pair of code units. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Unicode Demystified

Unicode Demystified

Richard Gillam
Fonts & Encodings

Fonts & Encodings

Yannis Haralambous
The Java® Language Specification, Java SE 8 Edition

The Java® Language Specification, Java SE 8 Edition

James Gosling, Bill Joy, Guy L. Steele Jr., Gilad Bracha, Alex Buckley

Publisher Resources

ISBN: 059610121XCatalog PageErrata