
212
|
Chapter 4: Encoding Methods
NCRs are useful for environments that ultimately produce XML or HTML les. e char-
acters represented by NCRs are explicitly identied as Unicode characters, yet benet
from the strength and persistence made possible by an ASCII-based notation. NCRs are
useful to represent hard-to-input characters, or characters whose underlying representa-
tion may be ambiguous when displayed in binary form. Take for instances the two Uni-
code characters “” (41) and “” (21). Both represent the same uppercase Latin
letter; however, the former is proportional, but sometimes implemented using half-width
metrics, and the latter is explicitly full-width. When it is critical to unambiguously use one
character over another, in the context of web documents, using
A to represent the
full-width uppercase Latin letter “A” has great value. Interestingly, dierentiating Latin “A”
(41), Cyrillic “A” (41), and Greek “A” (391) is an even greater feat, and NCRs
become especially useful when dierentiating such characters becomes critical.
NCRs do, however, require up to 10 bytes for representation, so their advantages in the
contexts in which they can be used come at the expense of increased string size.
ere are other NCR-like notations, oen referred to as escaping, whose use should be
pointed out or described, such the
\uXXXX notation as used ...